Fuchsia.dev 使用 yaml glossary-yaml 文件来定义所有 Fuchsia 专用术语。
这种格式允许 Fuchsia 使用单一来源定义,在单个位置进行修改并在整个文档中进行更新。然后,您可以使用文档 widget 在整个文档中使用这些定义,从而能够在文档中使用内嵌定义或完整定义。
此外,Fuchsia 还有一个可过滤的主要术语表页面。
添加术语表条目
如需添加术语表定义,您需要修改 yaml glossary-yaml,以添加定义的相关信息:
参考文档
术语表定义 | |
---|---|
term | 必填
定义术语表术语。 |
short_description | 必填
为您的术语表术语定义简短说明。此定义必须简短,最好是一句话。然后,您可以使用此定义将定义作为悬停文本显示。 您必须使用 HTML 语法。不过,如果您的定义很简单,只有一个句子或段落,则可以使用纯文本。 例如,以下是“ABI”一词的定义: ABI |
full_description | 可选
为您的术语字典定义完整的术语。此说明应完整,并充分说明该术语。 您必须使用 HTML 语法,包括链接。 不过,如果您的定义很简单,只有一个句子或段落,则可以使用纯文本。 对于链接,请使用以下格式: <a href="link_location">link_title</a> |
see_also | 可选
为该术语创建相关链接列表。这可以是指向其他术语或相关文档的链接。您必须使用 HTML 语法。
|
related_guides | 可选
为该术语创建相关指南列表。此字段应仅包含指向
|
area | 必填
定义术语表术语所涉及的领域列表。 这些区域可让您在术语表页面上过滤术语表术语。 您必须使用 HTML 语法。
有效区域 有效区域
|
示例
- term: 'ABI' short_description: 'The binary-level interface to the system.' full_description: 'The <a href="/docs/concepts/packages/system.md">Application Binary Interface</a> (ABI) for a system is the binary-level interface to the system. Typically you don''t write software that uses the system ABI directly. Instead, you write software against the system API. When the software is compiled, the binary artifact created by the compiler interfaces with the system through the ABI. Changes to the system ABI may require you to recompile your source code to account for the changes in the ABI.' see_also: ['<a href="/docs/glossary#ABI">ABI</a>', '<a href="/docs/glossary#storage-capability">Storage capability</a>'] related_guides: ['<a href="/docs/development/tracing/tutorial/registering-a-trace-provider.md">Registering a trace provider</a>', '<a href="/docs/development/hardware/paving.md">Installing Fuchsia on a device</a>'] area: ['System', 'General']
为术语表条目创建条目并提交 Gerrit 更改后,您的术语表术语将显示在术语表页面上,并且可用作文档 widget。