@@ -450,13 +450,13 @@ Renders to:
450
450
451
451
<!--
452
452
## 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
454
454
in a code block to allow users to download or copy its content to their clipboard.
455
455
This shortcode is used when the contents of the sample file is generic and reusable,
456
456
and you want the users to try it out themselves.
457
457
-->
458
458
## 源代码文件
459
- 你可以使用 ` {{< /* code */> }} ` 短代码将文件内容嵌入代码块中,
459
+ 你可以使用 ` {{% /* code_sample */% }} ` 短代码将文件内容嵌入代码块中,
460
460
以允许用户下载或复制其内容到他们的剪贴板。
461
461
当示例文件的内容是通用的、可复用的,并且希望用户自己尝试使用示例文件时,
462
462
可以使用此短代码。
@@ -476,15 +476,15 @@ For example:
476
476
如果未提供 ` language ` 参数,短代码将尝试根据文件扩展名推测编程语言。
477
477
478
478
``` none
479
- {{< /* code language="yaml" file="application/deployment-scale.yaml" */> }}
479
+ {{% /* code_sample language="yaml" file="application/deployment-scale.yaml" */% }}
480
480
```
481
481
482
482
<!--
483
483
The output is:
484
484
-->
485
485
输出是:
486
486
487
- {{< code language="yaml" file="application/deployment-scale.yaml" > }}
487
+ {{% code_sample language="yaml" file="application/deployment-scale.yaml" % }}
488
488
489
489
<!--
490
490
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:
496
496
在你的页面的 markdown 文本中,使用 ` code ` 短代码:
497
497
498
498
``` none
499
- {{< /* code file="<RELATIVE-PATH>/example-yaml>" */> }}
499
+ {{% /* code_sample file="<RELATIVE-PATH>/example-yaml>" */% }}
500
500
```
501
501
502
502
其中 ` <RELATIVE-PATH> ` 是要包含的示例文件的路径,相对于 ` examples ` 目录。
503
503
以下短代码引用位于 ` /content/en/examples/configmap/configmaps.yaml ` 的 YAML 文件。
504
504
505
505
``` none
506
- {{< /* code file="configmap/configmaps.yaml" */> }}
506
+ {{% /* code_sample file="configmap/configmaps.yaml" */% }}
507
507
```
508
508
509
509
<!--
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.
512
512
-->
513
- 传统的 ` {{%/* codenew */%}} ` 短代码将被替换为 ` {{%/* code */%}} ` 。
514
- 在新文档中使用 ` {{%/* code */%}} ` 。
513
+ 传统的 ` {{%/* codenew */%}} ` 短代码将被替换为 ` {{%/* code_sample */%}} ` 。
514
+ 在新文档中使用 ` {{%/* code_sample */%}} ` 。
515
515
516
516
<!--
517
517
## Third party content marker
0 commit comments