mirror of
https://github.com/GTNewHorizons/GuideNH.git
synced 2026-12-06 17:17:04 +00:00
Page:
Search zh CN
Pages
Annotations zh CN
Annotations
Debug Mode zh CN
Debug Mode
Developer Integration zh CN
Developer Integration
Examples zh CN
Examples
FAQ zh CN
FAQ
GameScene zh CN
GameScene
Getting Started zh CN
Getting Started
Guide Page Format zh CN
Guide Page Format
Home en US
Home zh CN
Home
Images And Assets zh CN
Images And Assets
Installation zh CN
Installation
Live Preview zh CN
Live Preview
Localization zh CN
Localization
Mod Compatibility zh CN
Mod Compatibility
Navigation zh CN
Navigation
Ponder zh CN
Ponder
Recipes zh CN
Recipes
Search zh CN
Search
Server Integration zh CN
Server Integration
Structure Export zh CN
Structure Export
Syntax Completion zh CN
Syntax Completion
Tags Reference zh CN
Tags Reference
Templates zh CN
Templates
No results
3
Search zh CN
ABKQPO edited this page 2026-11-16 16:00:02 +08:00
搜索
搜索可按标题、关键词和可搜索正文查找页面。
会索引什么
每个页面会贡献以下信息:
- 标题
- 完整可搜索正文
- guide id
- page id
- 语言元数据
导航 frontmatter 可以使用 navigation.keyword(单个值)或 navigation.keywords(列表)添加搜索别名。
别名会使用与其他可搜索文本相同的分析器并支持前缀模糊匹配,但不会替换页面显示标题或正文摘要。
标题来源
GuideNH 会按以下顺序选择标题:
frontmatter.navigation.title- 第一个
# Heading - 页面资源 id
正文来源
可搜索正文由解析后的 Markdown 内容,以及显式向索引贡献文本的自定义标签共同组成。
示例:
- 普通 Markdown 段落会被索引
- 标题会被索引
- tooltip 标签和链接标题可能被索引
- 命令链接标题会被索引
- 搜索不仅能匹配标题,也能匹配正文
结果布局
当前游戏内搜索页会显示:
- 页面图标(若存在)
- 蓝色显示的页面标题
- 右对齐的页面资源路径
- 正文中带高亮的文本片段
当查询为空时,页面会显示居中的提示信息;当没有匹配项时,会显示居中的“无结果”信息。
语言行为
搜索分析器会尽量根据当前 Minecraft 语言选择。未知语言会回退到英文分词。
查询范围
默认情况下,指南搜索最多返回 25 条结果。必要时,搜索页也可以在内部限制为单一 guide。
更利于搜索的编写建议
- 将真正面向人的页面名称放进
navigation.title。 - 重要页面最好从有意义的
#标题开始。 - 重要名词应写进正文,而不仅仅放进图片或图标里。
- 如果希望用户容易搜到页面,优先在文本里写出稳定的物品名称和机器名称。
示例搜索目标
内置示例指南很适合作为搜索冒烟测试,因为它包含:
- Markdown 语法示例
- 配方页面
- 结构预览
- 图片资源
- 3D 场景示例
准确的运行时文件列表可参考 示例。
GuideNH Wiki
English
- Home
- Installation
- Getting Started
- Live Preview
- Guide Page Format
- Navigation
- Search
- Images And Assets
- Tags Reference
- Syntax Completion
- GameScene
- Structure Export
- Annotations
- Ponder
- Recipes
- Localization
- Templates
- Examples
- Mod Compatibility
- Server Integration
- Debug Mode
- Developer Integration
- FAQ