跳转到内容
搜索文档

词汇表条目

最后更新 查看 MarkdownAgent 设置

定义

词汇表中的单个术语及其相应定义。

适用于

词汇表、文档页面、工具提示(tooltip)。

结构

数据

我们词汇表底层的数据保存在 /src/content/glossary/* 文件夹下的 YAML 文件中。

每个文件的结构应该类似于以下内容:

dns.yamlyaml
---
productName: DNS
entries:
  - term: active zone
    general_definition: |-
      a DNS zone that is active on Cloudflare requires changing its nameservers to Cloudflare's for management.
    associated_products:
      - Cloudflare One

  - term: apex domain
    general_definition: |-
      apex domain is used to refer to a domain that does not contain a subdomain part, such as `example.com` (without `www.`). It is also known as "root domain" or "naked domain".

  - term: DNS over HTTPS
    general_definition: |-
      DNS over HTTPS (DoH) is a standard for encrypting DNS traffic, preventing tracking and spoofing of DNS queries.
    associated_products:
      - 1.1.1.1
      - Cloudflare One

  - term: DNS over TLS
    general_definition: |-
      DNS over TLS (DoT) is a standard for encrypting DNS traffic using its own port (853) and TLS encryption.
    associated_products:
      - 1.1.1.1
      - Cloudflare One

相关值包括以下内容:

  • productName 字符串 必填

    • 与此文件关联的核心产品。应始终与 associated_products 中使用的格式/样式匹配。
  • entries 对象 必填

    • term 字符串 必填

      • 词汇表术语本身。
    • general_definition 字符串 必填

      • 术语的定义。应该足够通用,以适用于多个产品。此外,除非以专有名词开头,否则应以小写字母开头。
    • associated_products 数组 选填

      • 如果该术语与其他产品相关联。使用的任何名称都应与该关联文件的 productName 相对应。

用法

由于与我们的词汇表关联的结构化数据,我们可以将这些术语引入到多个位置。

产品级词汇表

产品级词汇表包含与特定产品关联的所有术语,这将直接引入该产品词汇表文件中的术语,以及在其 associated_products 中包含该产品的所有术语。

/src/content/docs/dns/glossary.mdxmdx
---
title: Glossary
pcx_content_type: glossary
---

import { Glossary } from "~/components";

Review the definitions for terms used across Cloudflare's DNS documentation.

<Glossary product="dns" />

词汇表定义

通过使用 <GlossaryDefinition> 组件,直接将词汇表定义引入您的 Markdown。

A DNS zone that is active on Cloudflare requires changing its nameservers to Cloudflare's for management.

是一个引用的定义,来自:

<GlossaryDefinition term="active zone" prepend="An active zone is " />

属性如下:

  • term 字符串 必填

    • 应与现有词汇表 YAML 文件中的术语匹配。
  • prepend 字符串 选填

    • 要在定义之前添加的文本。

词汇表工具提示

通过使用 <GlossaryTooltip> 组件,将组件定义引入特定短语的可聚焦工具提示中。

这是一个 工具提示 示例。

Here's a <GlossaryTooltip term="active zone">tooltip</GlossaryTooltip> example.

属性如下:

  • term 字符串 必填

    • 应与现有词汇表 YAML 文件中的术语匹配。
  • prepend 字符串 选填

    • 要在定义之前添加的文本。
  • link 字符串 选填

    • 将内部文本包装在 markdown 链接中,类似于普通的 markdown 格式。

由于空间限制,工具提示将始终默认使用术语的简短定义,即第一个换行符之前的定义文本。

这篇文档对您有帮助吗?