1
1
---
2
- title : 快速入门
2
+ title : 参考文档快速入门
3
+ linkTitle : Quickstart
3
4
content_type : task
4
- weight : 40
5
+ weight : 10
6
+ hide_summary : true
5
7
---
6
8
<!--
7
- title: Quickstart
9
+ title: Reference Documentation Quickstart
10
+ linkTitle: Quickstart
8
11
content_type: task
9
- weight: 40
12
+ weight: 10
13
+ hide_summary: true
10
14
-->
11
15
12
16
<!-- overview -->
@@ -46,18 +50,17 @@ Determine the base directory of your clone. For example, if you followed the
46
50
preceding step to get the repository, your base directory is
47
51
`github.com/website.` The remaining steps refer to your base directory as
48
52
`<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 >}}
54
53
-->
55
54
确定你的克隆副本的根目录。例如,如果你按照前面的步骤获取了仓库,你的根目录
56
55
会是 ` github.com/website ` 。接下来的步骤中,` <web-base> ` 用来指代你的根目录。
57
56
58
57
{{< 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 ) 。
61
64
{{< /note >}}
62
65
63
66
<!--
@@ -72,7 +75,7 @@ The script builds the following references:
72
75
* The `kubectl` command reference
73
76
* The Kubernetes API reference
74
77
-->
75
- ## update-imported-docs 的概述
78
+ ## update-imported-docs 的概述 {#overview-of-update-imported-docs}
76
79
77
80
脚本 ` update-imported-docs.py ` 位于 ` <web-base>/update-imported-docs/ ` 目录下,
78
81
能够生成以下参考文档:
@@ -138,8 +141,8 @@ The `update-imported-docs.py` script performs the following steps:
138
141
-->
139
142
脚本 ` update-imported-docs.py ` 执行以下步骤:
140
143
141
- 1 . 克隆配置文件中所指定的相关仓库。就生成参考文档这一目的而言,要克隆的
142
- 仓库默认为 ` kubernetes-sigs/reference-docs ` 。
144
+ 1 . 克隆配置文件中所指定的相关仓库。就生成参考文档这一目的而言,要克隆的仓库默认为
145
+ ` kubernetes-sigs/reference-docs ` 。
143
146
1 . 在所克隆的仓库下运行命令,准备文档生成器,之后生成 HTML 和 Markdown 文件。
144
147
1 . 将所生成的 HTML 和 Markdown 文件复制到 ` <web-base> ` 本地克隆副本中,
145
148
放在配置文件中所指定的目录下。
@@ -184,8 +187,8 @@ repos:
184
187
Single page Markdown documents, imported by the tool, must adhere to
185
188
the [Documentation Style Guide](/docs/contribute/style/style-guide/).
186
189
-->
187
- 通过工具导入的单页面的 Markdown 文档必须遵从
188
- [文档样式指南](/zh-cn/docs/contribute/style/style-guide/)。
190
+ 通过工具导入的单页面的 Markdown
191
+ 文档必须遵从 [文档样式指南](/zh-cn/docs/contribute/style/style-guide/)。
189
192
190
193
<!--
191
194
## Customizing reference.yml
@@ -200,7 +203,7 @@ If you encounter build issues, contact the SIG-Docs team on the
200
203
[#sig-docs Kubernetes Slack channel](https://kubernetes.slack.com).
201
204
-->
202
205
203
- # # 定制 reference.yml
206
+ # # 定制 reference.yml {#customizing-reference-yml}
204
207
205
208
打开 `<web-base>/update-imported-docs/reference.yml` 文件进行编辑。
206
209
在不了解参考文档构造命令的情况下,不要更改 `generate-command` 字段的内容。
@@ -209,24 +212,21 @@ If you encounter build issues, contact the SIG-Docs team on the
209
212
如果你遇到类似问题,请在 [Kubernetes Slack 的 # sig-docs 频道](https://kubernetes.slack.com)
210
213
联系 SIG-Docs 团队。
211
214
212
- <!--
213
215
{{< note >}}
216
+ <!--
214
217
The `generate-command` is an optional entry, which can be used to run a
215
218
given command or a short script to generate the docs from within a repository.
219
+ -->
220
+ 注意,`generate-command` 是一个可选项,用来运行指定命令或者短脚本以在仓库内生成文档。
216
221
{{< /note >}}
217
222
223
+ <!--
218
224
In `reference.yml`, `files` contains a list of `src` and `dst` fields.
219
225
The `src` field contains the location of a generated Markdown file in the cloned
220
226
` kubernetes-sigs/reference-docs` build directory, and the `dst` field specifies
221
227
where to copy this file in the cloned `kubernetes/website` repository.
222
228
For example :
223
229
-->
224
-
225
- {{< note >}}
226
- 注意,`generate-command` 是一个可选项,用来运行指定命令或者短脚本以在仓库
227
- 内生成文档。
228
- {{< /note >}}
229
-
230
230
在 `reference.yml` 文件中,`files` 属性包含了一组 `src` 和 `dst` 字段。
231
231
` src` 字段给出在所克隆的 `kubernetes-sigs/reference-docs` 构造目录中生成的
232
232
Markdown 文件的位置,而 `dst` 字段则给出了对应文件要复制到的、所克隆的
@@ -248,8 +248,8 @@ to the same destination directory, you can use wildcards in the value given to
248
248
` src` . You must provide the directory name as the value for `dst`.
249
249
For example :
250
250
-->
251
- 注意,如果从同一源目录中有很多文件要复制到目标目录,你可以在为 `src` 所设置的
252
- 值中使用通配符 。这时,为 `dst` 所设置的值必须是目录名称。例如:
251
+ 注意,如果从同一源目录中有很多文件要复制到目标目录,你可以在为 `src`
252
+ 所设置的值中使用通配符 。这时,为 `dst` 所设置的值必须是目录名称。例如:
253
253
254
254
` ` ` yaml
255
255
files:
@@ -262,7 +262,7 @@ For example:
262
262
263
263
You can run the `update-imported-docs.py` tool as follows :
264
264
-->
265
- # # 运行 update-imported-docs 工具
265
+ # # 运行 update-imported-docs 工具 {#running-the-update-imported-docs-tool}
266
266
267
267
你可以用如下方式运行 `update-imported-docs.py` 工具:
268
268
@@ -279,26 +279,27 @@ cd <web-base>/update-imported-docs
279
279
` ` `
280
280
281
281
<!-- Revisit : is the release configuration used -->
282
- <!-- # # Fixing Links
282
+ <!--
283
+ # # Fixing Links
283
284
284
285
The `release.yml` configuration file contains instructions to fix relative links.
285
286
To fix relative links within your imported files, set the`gen-absolute-links`
286
287
property to `true`. You can find an example of this in
287
288
[`release.yml`](https://github.com/kubernetes/website/blob/main/update-imported-docs/release.yml).
288
289
-->
289
- # # 修复链接
290
+ # # 修复链接 {#fixing-links}
290
291
291
292
配置文件 `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)
294
295
文件中找到示例。
295
296
296
297
<!--
297
298
# # Adding and committing changes in kubernetes/website
298
299
299
300
List the files that were generated and copied to `<web-base>` :
300
301
-->
301
- # # 添加并提交 kubernetes/website 中的变更
302
+ # # 添加并提交 kubernetes/website 中的变更 {#adding-and-committing-changes-in-k8s-website}
302
303
303
304
枚举新生成并复制到 `<web-base>` 的文件:
304
305
0 commit comments