决定哪些内容可以被发现
文章 ID 决定 URL。归档、星图、RSS 和搜索只接受可公开的主文章。译文通过 translationOf 关联同一个 ID。这样可以先决定一篇文章是否可被发现,再决定拿哪种语言的题目和正文为它建立索引。
分开处理两种全文索引
Pagefind在静态构建后扫描渲染的中文正文。页面里的英文译文排除在中文索引之外。MiniSearch用公开译文的标题、摘要和正文建立英文索引。英文搜索组合多个词时要求每个词有匹配,并提高标题和摘要的权重。
验证搜索与页面一致
可以把界面切成英文,搜索 server acknowledgement,打开联机大厅的技术笔记,再切回中文。两种正文共用同一个路径。没有译文的文章需要在英文界面标注这一点。
Choose what can be discovered
The article ID determines the URL. The archive, star map, RSS and search accept public articles only. Translations link to the same ID through translationOf. Decide whether an article is discoverable first, then choose its title and body for the relevant language index.
Handle the two full-text indexes separately
Pagefind scans rendered Chinese text after the static build. Embedded English text is excluded from that index. MiniSearch indexes the title, summary and body of public English translations. A multiple-word English query requires every term to match, with extra weight given to the title and summary.
Verify the result matches the article
Switch to English, search for server acknowledgement, open the multiplayer lobby note and switch back to Chinese. Both versions share the same path. The English interface identifies articles whose translations are missing.