Skip to content

Commit e7c1da2

Browse files
authored
Merge pull request #37601 from windsonsea/quicks
[zh] sync quickstart.md
2 parents ee88b68 + b326156 commit e7c1da2

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

content/zh-cn/docs/contribute/generate-ref-docs/quickstart.md

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
---
2-
title: 快速入门
2+
title: 参考文档快速入门
3+
linkTitle: Quickstart
34
content_type: task
4-
weight: 40
5+
weight: 10
6+
hide_summary: true
57
---
68
<!--
7-
title: Quickstart
9+
title: Reference Documentation Quickstart
10+
linkTitle: Quickstart
811
content_type: task
9-
weight: 40
12+
weight: 10
13+
hide_summary: true
1014
-->
1115

1216
<!-- overview -->
@@ -46,18 +50,17 @@ Determine the base directory of your clone. For example, if you followed the
4650
preceding step to get the repository, your base directory is
4751
`github.com/website.` The remaining steps refer to your base directory as
4852
`<web-base>`.
49-
50-
{{< note>}}
51-
If you want to change the content of the component tools and API reference,
52-
see the [contributing upstream guide](/docs/contribute/generate-ref-docs/contribute-upstream).
53-
{{< /note >}}
5453
-->
5554
确定你的克隆副本的根目录。例如,如果你按照前面的步骤获取了仓库,你的根目录
5655
会是 `github.com/website`。接下来的步骤中,`<web-base>` 用来指代你的根目录。
5756

5857
{{< note>}}
59-
如果你希望更改构建工具和 API 参考资料,可以阅读
60-
[上游贡献指南](/zh-cn/docs/contribute/generate-ref-docs/contribute-upstream).
58+
<!--
59+
If you want to change the content of the component tools and API reference,
60+
see the [contributing upstream guide](/docs/contribute/generate-ref-docs/contribute-upstream).
61+
-->
62+
如果你希望更改构建工具和 API 参考资料,
63+
可以阅读[上游贡献指南](/zh-cn/docs/contribute/generate-ref-docs/contribute-upstream)
6164
{{< /note >}}
6265

6366
<!--
@@ -72,7 +75,7 @@ The script builds the following references:
7275
* The `kubectl` command reference
7376
* The Kubernetes API reference
7477
-->
75-
## update-imported-docs 的概述
78+
## update-imported-docs 的概述 {#overview-of-update-imported-docs}
7679

7780
脚本 `update-imported-docs.py` 位于 `<web-base>/update-imported-docs/` 目录下,
7881
能够生成以下参考文档:
@@ -138,8 +141,8 @@ The `update-imported-docs.py` script performs the following steps:
138141
-->
139142
脚本 `update-imported-docs.py` 执行以下步骤:
140143

141-
1. 克隆配置文件中所指定的相关仓库。就生成参考文档这一目的而言,要克隆的
142-
仓库默认为 `kubernetes-sigs/reference-docs`
144+
1. 克隆配置文件中所指定的相关仓库。就生成参考文档这一目的而言,要克隆的仓库默认为
145+
`kubernetes-sigs/reference-docs`
143146
1. 在所克隆的仓库下运行命令,准备文档生成器,之后生成 HTML 和 Markdown 文件。
144147
1. 将所生成的 HTML 和 Markdown 文件复制到 `<web-base>` 本地克隆副本中,
145148
放在配置文件中所指定的目录下。
@@ -184,8 +187,8 @@ repos:
184187
Single page Markdown documents, imported by the tool, must adhere to
185188
the [Documentation Style Guide](/docs/contribute/style/style-guide/).
186189
-->
187-
通过工具导入的单页面的 Markdown 文档必须遵从
188-
[文档样式指南](/zh-cn/docs/contribute/style/style-guide/)。
190+
通过工具导入的单页面的 Markdown
191+
文档必须遵从[文档样式指南](/zh-cn/docs/contribute/style/style-guide/)。
189192
190193
<!--
191194
## Customizing reference.yml
@@ -200,7 +203,7 @@ If you encounter build issues, contact the SIG-Docs team on the
200203
[#sig-docs Kubernetes Slack channel](https://kubernetes.slack.com).
201204
-->
202205

203-
## 定制 reference.yml
206+
## 定制 reference.yml {#customizing-reference-yml}
204207

205208
打开 `<web-base>/update-imported-docs/reference.yml` 文件进行编辑。
206209
在不了解参考文档构造命令的情况下,不要更改 `generate-command` 字段的内容。
@@ -209,24 +212,21 @@ If you encounter build issues, contact the SIG-Docs team on the
209212
如果你遇到类似问题,请在 [Kubernetes Slack 的 #sig-docs 频道](https://kubernetes.slack.com)
210213
联系 SIG-Docs 团队。
211214

212-
<!--
213215
{{< note >}}
216+
<!--
214217
The `generate-command` is an optional entry, which can be used to run a
215218
given command or a short script to generate the docs from within a repository.
219+
-->
220+
注意,`generate-command` 是一个可选项,用来运行指定命令或者短脚本以在仓库内生成文档。
216221
{{< /note >}}
217222

223+
<!--
218224
In `reference.yml`, `files` contains a list of `src` and `dst` fields.
219225
The `src` field contains the location of a generated Markdown file in the cloned
220226
`kubernetes-sigs/reference-docs` build directory, and the `dst` field specifies
221227
where to copy this file in the cloned `kubernetes/website` repository.
222228
For example:
223229
-->
224-
225-
{{< note >}}
226-
注意,`generate-command` 是一个可选项,用来运行指定命令或者短脚本以在仓库
227-
内生成文档。
228-
{{< /note >}}
229-
230230
在 `reference.yml` 文件中,`files` 属性包含了一组 `src` 和 `dst` 字段。
231231
`src` 字段给出在所克隆的 `kubernetes-sigs/reference-docs` 构造目录中生成的
232232
Markdown 文件的位置,而 `dst` 字段则给出了对应文件要复制到的、所克隆的
@@ -248,8 +248,8 @@ to the same destination directory, you can use wildcards in the value given to
248248
`src`. You must provide the directory name as the value for `dst`.
249249
For example:
250250
-->
251-
注意,如果从同一源目录中有很多文件要复制到目标目录,你可以在为 `src` 所设置的
252-
值中使用通配符。这时,为 `dst` 所设置的值必须是目录名称。例如:
251+
注意,如果从同一源目录中有很多文件要复制到目标目录,你可以在为 `src`
252+
所设置的值中使用通配符。这时,为 `dst` 所设置的值必须是目录名称。例如:
253253

254254
```yaml
255255
files:
@@ -262,7 +262,7 @@ For example:
262262

263263
You can run the `update-imported-docs.py` tool as follows:
264264
-->
265-
## 运行 update-imported-docs 工具
265+
## 运行 update-imported-docs 工具 {#running-the-update-imported-docs-tool}
266266

267267
你可以用如下方式运行 `update-imported-docs.py` 工具:
268268

@@ -279,26 +279,27 @@ cd <web-base>/update-imported-docs
279279
```
280280

281281
<!-- Revisit: is the release configuration used -->
282-
<!-- ## Fixing Links
282+
<!--
283+
## Fixing Links
283284

284285
The `release.yml` configuration file contains instructions to fix relative links.
285286
To fix relative links within your imported files, set the`gen-absolute-links`
286287
property to `true`. You can find an example of this in
287288
[`release.yml`](https://github.com/kubernetes/website/blob/main/update-imported-docs/release.yml).
288289
-->
289-
## 修复链接
290+
## 修复链接 {#fixing-links}
290291

291292
配置文件 `release.yml` 中包含用来修复相对链接的指令。
292-
若要修复导入文件中的相对链接,将 `gen-absolute-links` 属性设置为 `true`。
293-
你可以在 [`release.yml`](https://github.com/kubernetes/website/blob/main/update-imported-docs/release.yml)
293+
若要修复导入文件中的相对链接,将 `gen-absolute-links` 属性设置为 `true`。你可以在
294+
[`release.yml`](https://github.com/kubernetes/website/blob/main/update-imported-docs/release.yml)
294295
文件中找到示例。
295296

296297
<!--
297298
## Adding and committing changes in kubernetes/website
298299

299300
List the files that were generated and copied to `<web-base>`:
300301
-->
301-
## 添加并提交 kubernetes/website 中的变更
302+
## 添加并提交 kubernetes/website 中的变更 {#adding-and-committing-changes-in-k8s-website}
302303

303304
枚举新生成并复制到 `<web-base>` 的文件:
304305

0 commit comments

Comments
 (0)