@@ -19,7 +19,7 @@ This page shows how to create a new topic for the Kubernetes docs.
19
19
20
20
<!--
21
21
Create a fork of the Kubernetes documentation repository as described in
22
- [Start contributing ](/docs/contribute/start /).
22
+ [Open a PR ](/docs/contribute/new-content/open-a-pr /).
23
23
-->
24
24
如[ 发起 PR] ( /zh-cn/docs/contribute/new-content/open-a-pr/ ) 中所述,创建 Kubernetes 文档库的派生副本。
25
25
@@ -52,20 +52,30 @@ Tutorial | A tutorial page shows how to accomplish a goal that ties together sev
52
52
{{< /table >}}
53
53
54
54
<!--
55
+ ### Creating a new page
55
56
Use a [content type](/docs/contribute/style/page-content-types/) for each new page
56
- that you write. Using page type helps ensure
57
- consistency among topics of a given type.
57
+ that you write. The docs site provides templates or
58
+ [Hugo archetypes](https://gohugo.io/content-management/archetypes/) to create
59
+ new content pages. To create a new type of page, run `hugo new` with the path to the file
60
+ you want to create. For example:
58
61
-->
62
+ ### 创建一个新页面{#creating-a-new-page}
63
+
59
64
为每个新页面选择其[ 内容类型] ( /zh-cn/docs/contribute/style/page-content-types/ ) 。
60
- 使用页面类型有助于确保给定类型的各主题之间保持一致。
65
+ 文档站提供了模板或 [ Hugo Archetypes] ( https://gohugo.io/content-management/archetypes/ ) 来创建新的内容页面。
66
+ 要创建新类型的页面,请使用要创建的文件的路径,运行 ` hugo new ` 命令。例如:
67
+
68
+ ```
69
+ hugo new docs/concepts/my-first-concept.md
70
+ ```
61
71
62
72
<!--
63
73
## Choosing a title and filename
64
74
65
75
Choose a title that has the keywords you want search engines to find.
66
76
Create a filename that uses the words in your title separated by hyphens.
67
77
For example, the topic with title
68
- [Using an HTTP Proxy to Access the Kubernetes API](/docs/tasks/access -kubernetes-api /http-proxy-access-api/)
78
+ [Using an HTTP Proxy to Access the Kubernetes API](/docs/tasks/extend -kubernetes/http-proxy-access-api/)
69
79
has filename `http-proxy-access-api.md`. You don't need to put
70
80
"kubernetes" in the filename, because "kubernetes" is already in the
71
81
URL for the topic, for example:
@@ -179,8 +189,8 @@ following cases (not an exhaustive list):
179
189
[FlexVolume](/docs/concepts/storage/volumes#flexvolume) implementation.
180
190
- The code is an incomplete example because its purpose is to highlight a
181
191
portion of a larger file. For example, when describing ways to
182
- customize the [PodSecurityPolicy ](/docs/tasks/administer-cluster/sysctl-cluster/#podsecuritypolicy)
183
- for some reasons, you can provide a short snippet directly in your topic file.
192
+ customize a [RoleBinding ](/docs/reference/access-authn-authz/rbac/#role-binding-examples),
193
+ you can provide a short snippet directly in your topic file.
184
194
- The code is not meant for users to try out due to other reasons. For example,
185
195
when describing how a new attribute should be added to a resource using the
186
196
`kubectl edit` command, you can provide a short example that includes only
@@ -191,8 +201,8 @@ following cases (not an exhaustive list):
191
201
- 代码不够通用,用户无法验证。例如,你可以嵌入 YAML 文件来创建一个依赖于特定
192
202
[ FlexVolume] ( /zh-cn/docs/concepts/storage/volumes#flexvolume ) 实现的 Pod。
193
203
- 该代码是一个不完整的示例,因为其目的是突出展现某个大文件中的部分内容。
194
- 例如,在描述出于某些原因定制
195
- [ PodSecurityPolicy ] ( /zh-cn/docs/tasks/administer-cluster/sysctl-cluster/#podsecuritypolicy )
204
+ 例如,在描述
205
+ [ RoleBinding ] ( /zh-cn/docs/reference/access-authn-authz/rbac/#role-binding-examples )
196
206
的方法时,你可以在主题文件中直接提供一个短的代码段。
197
207
- 由于某些其他原因,该代码不适合用户验证。
198
208
例如,当使用 ` kubectl edit ` 命令描述如何将新属性添加到资源时,
@@ -282,7 +292,7 @@ submitted to ensure all examples pass the tests.
282
292
283
293
<!--
284
294
For an example of a topic that uses this technique, see
285
- [Running a Single-Instance Stateful Application](/docs/tutorials/stateful -application/run-stateful-application/).
295
+ [Running a Single-Instance Stateful Application](/docs/tasks/run -application/run-single-instance -stateful-application/).
286
296
-->
287
297
有关使用此技术的主题的示例,请参见
288
298
[ 运行单实例有状态的应用] ( /zh-cn/docs/tasks/run-application/run-single-instance-stateful-application/ ) 。
0 commit comments