Skip to content

Commit 13561ab

Browse files
authored
Merge pull request #25448 from jiaj12/patch-49
Update index.md
2 parents fcb75a2 + d49ff2b commit 13561ab

File tree

1 file changed

+41
-4
lines changed
  • content/zh/docs/contribute/style/hugo-shortcodes

1 file changed

+41
-4
lines changed

content/zh/docs/contribute/style/hugo-shortcodes/index.md

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,33 @@ parameter.
125125

126126
<!--
127127
## Glossary
128+
There are two glossary tooltips.
128129
129130
You can reference glossary terms with an inclusion that will automatically
130131
update and replace content with the relevant links from [our
131132
glossary](/docs/reference/glossary/). When the term is moused-over by someone
132133
using the online documentation, the glossary entry will display a tooltip.
134+
135+
As well as inclusions with tooltips, you can reuse the definitions from the glossary in
136+
page content.
133137
-->
134138
## 词汇
135139

140+
有两种词汇表提示。
141+
136142
你可以通过加入术语词汇的短代码,来自动更新和替换相应链接中的内容
137143
[我们的词汇库](/zh/docs/reference/glossary/)
138144
这样,在浏览在线文档,鼠标移到术语上时,术语解释就会显示在提示框中。
139145

146+
除了包含工具提示外,你还可以重用页面内容中词汇表中的定义。
140147
<!--
141148
The raw data for glossary terms is stored at [https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary](https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary), with a content file for each glossary term.
142149
-->
143150

144151
词汇术语的原始数据保存在 [https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary](https://github.com/kubernetes/website/tree/master/content/en/docs/reference/glossary),每个内容文件对应相应的术语解释。
145152

146153
<!--
147-
### Glossary Demo
154+
### Glossary demo
148155
149156
For example, the following include within the markdown will render to
150157
{{< glossary_tooltip text="cluster" term_id="cluster" >}} with a tooltip:
@@ -154,9 +161,40 @@ For example, the following include within the markdown will render to
154161
例如,下面的代码在 markdown 中将会转换为 `{{< glossary_tooltip text="cluster" term_id="cluster" >}}`
155162
然后在提示框中显示。
156163

157-
```liquid
164+
```
158165
{{</* glossary_tooltip text="cluster" term_id="cluster" */>}}
159166
```
167+
<!--
168+
Here's a short glossary definition:
169+
-->
170+
这是一个简短的词汇表定义:
171+
172+
```
173+
{{</* glossary_definition prepend="A cluster is" term_id="cluster" length="short" */>}}
174+
```
175+
176+
<!--
177+
which renders as:
178+
{{< glossary_definition prepend="A cluster is" term_id="cluster" length="short" >}}
179+
-->
180+
呈现为:
181+
{{< glossary_definition prepend="A cluster is" term_id="cluster" length="short" >}}
182+
183+
<!--
184+
You can also include a full definition:
185+
-->
186+
你也可以包括完整的定义:
187+
188+
```
189+
{{</* glossary_definition term_id="cluster" length="all" */>}}
190+
```
191+
192+
<!--
193+
which renders as:
194+
{{< glossary_definition term_id="cluster" length="all" >}}
195+
-->
196+
呈现为:
197+
{{< glossary_definition term_id="cluster" length="all" >}}
160198

161199
<!--
162200
## Table captions
@@ -182,7 +220,6 @@ Here's an example:
182220
下面是一个例子:
183221

184222
<!--
185-
186223
```go-html-template
187224
{{</* table caption="Configuration parameters" >}}
188225
Parameter | Description | Default
@@ -199,7 +236,7 @@ Parameter | Description | Default
199236
{{< /table >}}
200237
-->
201238

202-
```go-html-template
239+
```go-html-template
203240
{{</* table caption="配置参数" >}}
204241
参数 | 描述 | 默认值
205242
:---------|:------------|:-------

0 commit comments

Comments
 (0)