Skip to content

Commit 54fc19f

Browse files
committed
[zh-cn] sync style/hugo-shortcodes/index
Signed-off-by: xin.li <[email protected]>
1 parent 224572c commit 54fc19f

File tree

1 file changed

+10
-10
lines changed
  • content/zh-cn/docs/contribute/style/hugo-shortcodes

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,13 @@ Renders to:
450450

451451
<!--
452452
## Source code files
453-
You can use the `{{</* code */>}}` shortcode to embed the contents of file
453+
You can use the `{{%/* code_sample */%}}` shortcode to embed the contents of file
454454
in a code block to allow users to download or copy its content to their clipboard.
455455
This shortcode is used when the contents of the sample file is generic and reusable,
456456
and you want the users to try it out themselves.
457457
-->
458458
## 源代码文件
459-
你可以使用 `{{</* code */>}}` 短代码将文件内容嵌入代码块中,
459+
你可以使用 `{{%/* code_sample */%}}` 短代码将文件内容嵌入代码块中,
460460
以允许用户下载或复制其内容到他们的剪贴板。
461461
当示例文件的内容是通用的、可复用的,并且希望用户自己尝试使用示例文件时,
462462
可以使用此短代码。
@@ -476,15 +476,15 @@ For example:
476476
如果未提供 `language` 参数,短代码将尝试根据文件扩展名推测编程语言。
477477

478478
```none
479-
{{</* code language="yaml" file="application/deployment-scale.yaml" */>}}
479+
{{%/* code_sample language="yaml" file="application/deployment-scale.yaml" */%}}
480480
```
481481

482482
<!--
483483
The output is:
484484
-->
485485
输出是:
486486

487-
{{< code language="yaml" file="application/deployment-scale.yaml" >}}
487+
{{% code_sample language="yaml" file="application/deployment-scale.yaml" %}}
488488

489489
<!--
490490
When adding a new sample file, such as a YAML file, create the file in one
@@ -496,22 +496,22 @@ the page. In the markdown of your page, use the `code` shortcode:
496496
在你的页面的 markdown 文本中,使用 `code` 短代码:
497497

498498
```none
499-
{{</* code file="<RELATIVE-PATH>/example-yaml>" */>}}
499+
{{%/* code_sample file="<RELATIVE-PATH>/example-yaml>" */%}}
500500
```
501501

502502
其中 `<RELATIVE-PATH>` 是要包含的示例文件的路径,相对于 `examples` 目录。
503503
以下短代码引用位于 `/content/en/examples/configmap/configmaps.yaml` 的 YAML 文件。
504504

505505
```none
506-
{{</* code file="configmap/configmaps.yaml" */>}}
506+
{{%/* code_sample file="configmap/configmaps.yaml" */%}}
507507
```
508508

509509
<!--
510-
The legacy `{{%/* codenew */%}}` shortcode is being replaced by `{{%/* code */%}}`.
511-
Use `{{%/* code */%}}` in new documentation.
510+
The legacy `{{%/* codenew */%}}` shortcode is being replaced by `{{%/* code_sample */%}}`.
511+
Use `{{%/* code_sample */%}}` (not `{{%/* codenew */%}}` or `{{%/* code */%}}`) in new documentation.
512512
-->
513-
传统的 `{{%/* codenew */%}}` 短代码将被替换为 `{{%/* code */%}}`
514-
在新文档中使用 `{{%/* code */%}}`
513+
传统的 `{{%/* codenew */%}}` 短代码将被替换为 `{{%/* code_sample */%}}`
514+
在新文档中使用 `{{%/* code_sample */%}}`
515515

516516
<!--
517517
## Third party content marker

0 commit comments

Comments
 (0)