Skip to content

Commit 090fd83

Browse files
authored
Merge pull request #36240 from yanrongshi/zh-cn]Sync-write-new-topic.md
[zh-cn] Sync write-new-topic.md
2 parents a079080 + 19b4c15 commit 090fd83

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

content/zh-cn/docs/contribute/style/write-new-topic.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This page shows how to create a new topic for the Kubernetes docs.
1919

2020
<!--
2121
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/).
2323
-->
2424
[发起 PR](/zh-cn/docs/contribute/new-content/open-a-pr/)中所述,创建 Kubernetes 文档库的派生副本。
2525

@@ -52,20 +52,30 @@ Tutorial | A tutorial page shows how to accomplish a goal that ties together sev
5252
{{< /table >}}
5353

5454
<!--
55+
### Creating a new page
5556
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:
5861
-->
62+
### 创建一个新页面{#creating-a-new-page}
63+
5964
为每个新页面选择其[内容类型](/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+
```
6171

6272
<!--
6373
## Choosing a title and filename
6474
6575
Choose a title that has the keywords you want search engines to find.
6676
Create a filename that uses the words in your title separated by hyphens.
6777
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/)
6979
has filename `http-proxy-access-api.md`. You don't need to put
7080
"kubernetes" in the filename, because "kubernetes" is already in the
7181
URL for the topic, for example:
@@ -179,8 +189,8 @@ following cases (not an exhaustive list):
179189
[FlexVolume](/docs/concepts/storage/volumes#flexvolume) implementation.
180190
- The code is an incomplete example because its purpose is to highlight a
181191
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.
184194
- The code is not meant for users to try out due to other reasons. For example,
185195
when describing how a new attribute should be added to a resource using the
186196
`kubectl edit` command, you can provide a short example that includes only
@@ -191,8 +201,8 @@ following cases (not an exhaustive list):
191201
- 代码不够通用,用户无法验证。例如,你可以嵌入 YAML 文件来创建一个依赖于特定
192202
[FlexVolume](/zh-cn/docs/concepts/storage/volumes#flexvolume) 实现的 Pod。
193203
- 该代码是一个不完整的示例,因为其目的是突出展现某个大文件中的部分内容。
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)
196206
的方法时,你可以在主题文件中直接提供一个短的代码段。
197207
- 由于某些其他原因,该代码不适合用户验证。
198208
例如,当使用 `kubectl edit` 命令描述如何将新属性添加到资源时,
@@ -282,7 +292,7 @@ submitted to ensure all examples pass the tests.
282292

283293
<!--
284294
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/).
286296
-->
287297
有关使用此技术的主题的示例,请参见
288298
[运行单实例有状态的应用](/zh-cn/docs/tasks/run-application/run-single-instance-stateful-application/)

0 commit comments

Comments
 (0)