From d49ff2b85f362670738a1e266310a2189181b17f Mon Sep 17 00:00:00 2001 From: jiajie Date: Mon, 7 Dec 2020 15:51:44 +0800 Subject: [PATCH] update --- .../contribute/style/hugo-shortcodes/index.md | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/content/zh/docs/contribute/style/hugo-shortcodes/index.md b/content/zh/docs/contribute/style/hugo-shortcodes/index.md index dc3400c611..b2567f0771 100644 --- a/content/zh/docs/contribute/style/hugo-shortcodes/index.md +++ b/content/zh/docs/contribute/style/hugo-shortcodes/index.md @@ -125,18 +125,25 @@ parameter. ## 词汇 +有两种词汇表提示。 + 你可以通过加入术语词汇的短代码,来自动更新和替换相应链接中的内容 ([我们的词汇库](/zh/docs/reference/glossary/)) 这样,在浏览在线文档,鼠标移到术语上时,术语解释就会显示在提示框中。 +除了包含工具提示外,你还可以重用页面内容中词汇表中的定义。 @@ -144,7 +151,7 @@ The raw data for glossary terms is stored at [https://github.com/kubernetes/webs 词汇术语的原始数据保存在 [https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary](https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary),每个内容文件对应相应的术语解释。 +这是一个简短的词汇表定义: + +``` +{{}} +``` + + +呈现为: +{{< glossary_definition prepend="A cluster is" term_id="cluster" length="short" >}} + + +你也可以包括完整的定义: + +``` +{{}} +``` + + +呈现为: +{{< glossary_definition term_id="cluster" length="all" >}} -```go-html-template +​```go-html-template {{}} 参数 | 描述 | 默认值 :---------|:------------|:-------