You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -13,7 +13,14 @@ This repository contains the assets required to build the [Kubernetes website an
13
13
我们非常高兴您想要参与贡献!
14
14
15
15
<!--
16
-
# Using this repository
16
+
- [Contributing to the docs](#contributing-to-the-docs)
17
+
- [Localization ReadMes](#localization-readmemds)
18
+
-->
19
+
-[为文档做贡献](#为文档做贡献)
20
+
-[README.md 本地化](#readmemd-本地化)
21
+
22
+
<!--
23
+
## Using this repository
17
24
18
25
You can run the website locally using Hugo (Extended version), or you can run it in a container runtime. We strongly recommend using the container runtime, as it gives deployment consistency with the live website.
19
26
-->
@@ -46,7 +53,7 @@ Before you start, install the dependencies. Clone the repository and navigate to
@@ -57,7 +64,7 @@ The Kubernetes website uses the [Docsy Hugo theme](https://github.com/google/doc
57
64
58
65
Kubernetes 网站使用的是 [Docsy Hugo 主题](https://github.com/google/docsy#readme)。 即使你打算在容器中运行网站,我们也强烈建议你通过运行以下命令来引入子模块和其他开发依赖项:
59
66
60
-
```
67
+
```bash
61
68
# pull in the Docsy submodule
62
69
git submodule update --init --recursive --depth 1
63
70
```
@@ -72,15 +79,23 @@ To build the site in a container, run the following to build the container image
72
79
73
80
要在容器中构建网站,请通过以下命令来构建容器镜像并运行:
74
81
75
-
```
82
+
```bash
76
83
make container-image
77
84
make container-serve
78
85
```
79
86
80
87
<!--
81
-
Open up your browser to http://localhost:1313 to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
88
+
If you see errors, it probably means that the hugo container did not have enough computing resources available. To solve it, increase the amount of allowed CPU and memory usage for Docker on your machine ([MacOSX](https://docs.docker.com/docker-for-mac/#resources) and [Windows](https://docs.docker.com/docker-for-windows/#resources)).
Open up your browser to <http://localhost:1313> to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
97
+
-->
98
+
启动浏览器,打开 <http://localhost:1313> 来查看网站。
84
99
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
85
100
86
101
<!--
@@ -104,18 +119,84 @@ make serve
104
119
```
105
120
106
121
<!--
107
-
This will start the local Hugo server on port 1313. Open up your browser to http://localhost:1313 to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
122
+
This will start the local Hugo server on port 1313. Open up your browser to <http://localhost:1313> to view the website. As you make changes to the source files, Hugo updates the website and forces a browser refresh.
108
123
-->
109
124
上述命令会在端口 1313 上启动本地 Hugo 服务器。
110
-
启动浏览器,打开 http://localhost:1313 来查看网站。
125
+
启动浏览器,打开 <http://localhost:1313> 来查看网站。
111
126
当你对源文件作出修改时,Hugo 会更新网站并强制浏览器执行刷新操作。
112
127
128
+
<!--
129
+
## Building the API reference pages
130
+
-->
131
+
## 构建 API 参考页面
132
+
133
+
<!--
134
+
The API reference pages located in `content/en/docs/reference/kubernetes-api` are built from the Swagger specification, using <https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs>.
135
+
136
+
To update the reference pages for a new Kubernetes release follow these steps:
137
+
-->
138
+
位于 `content/en/docs/reference/kubernetes-api` 的 API 参考页面是根据 Swagger 规范构建的,使用 <https://github.com/kubernetes-sigs/reference-docs/tree/master/gen-resourcesdocs>。
You can test the results locally by making and serving the site from a container image:
176
+
-->
177
+
您可以通过从容器映像创建和提供站点来在本地测试结果:
178
+
179
+
```bash
180
+
make container-image
181
+
make container-serve
182
+
```
183
+
184
+
<!--
185
+
In a web browser, go to <http://localhost:1313/docs/reference/kubernetes-api/> to view the API reference.
186
+
-->
187
+
在 Web 浏览器中,打开 <http://localhost:1313/docs/reference/kubernetes-api/> 查看 API 参考。
188
+
189
+
<!--
190
+
5. When all changes of the new contract are reflected into the configuration files `toc.yaml` and `fields.yaml`, create a Pull Request with the newly generated API reference pages.
191
+
-->
192
+
5. 当所有新的更改都反映到配置文件 `toc.yaml` 和 `fields.yaml` 中时,使用新生成的 API 参考页面创建一个 Pull Request。
193
+
113
194
<!--
114
195
## Troubleshooting
196
+
115
197
### error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
116
198
117
199
Hugo is shipped in two set of binaries for technical reasons. The current website runs based on the **Hugo Extended** version only. In the [release page](https://github.com/gohugoio/hugo/releases) look for archives with `extended` in the name. To confirm, run `hugo version` and look for the word `extended`.
118
-
119
200
-->
120
201
## 故障排除
121
202
@@ -135,18 +216,24 @@ If you run `make serve` on macOS and receive the following error:
135
216
136
217
如果在 macOS 上运行 `make serve` 收到以下错误:
137
218
138
-
```
219
+
```bash
139
220
ERROR 2020/08/01 19:09:18 Error: listen tcp 127.0.0.1:1313: socket: too many open files
You can click the **Fork** button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a *fork*. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it.
285
+
You can click the **Fork** button in the upper-right area of the screen to create a copy of this repository in your GitHub account. This copy is called a _fork_. Make any changes you want in your fork, and when you are ready to send those changes to us, go to your fork and create a new pull request to let us know about it.
194
286
195
-
Once your pull request is created, a Kubernetes reviewer will take responsibility for providing clear, actionable feedback. As the owner of the pull request, **it is your responsibility to modify your pull request to address the feedback that has been provided to you by the Kubernetes reviewer.**
287
+
Once your pull request is created, a Kubernetes reviewer will take responsibility for providing clear, actionable feedback. As the owner of the pull request, **it is your responsibility to modify your pull request to address the feedback that has been provided to you by the Kubernetes reviewer.**
196
288
-->
197
289
# 为文档做贡献
198
290
199
291
你也可以点击屏幕右上方区域的 **Fork** 按钮,在你自己的 GitHub
200
-
账号下创建本仓库的拷贝。此拷贝被称作 *fork*。
292
+
账号下创建本仓库的拷贝。此拷贝被称作 _fork_。
201
293
你可以在自己的拷贝中任意地修改文档,并在你已准备好将所作修改提交给我们时,
202
294
在你自己的拷贝下创建一个拉取请求(Pull Request),以便让我们知道。
203
295
@@ -208,7 +300,7 @@ Once your pull request is created, a Kubernetes reviewer will take responsibilit
208
300
<!--
209
301
Also, note that you may end up having more than one Kubernetes reviewer provide you feedback or you may end up getting feedback from a Kubernetes reviewer that is different than the one initially assigned to provide you feedback.
210
302
211
-
Furthermore, in some cases, one of your reviewers might ask for a technical review from a Kubernetes tech reviewer when needed. Reviewers will do their best to provide feedback in a timely fashion but response time can vary based on circumstances.
303
+
Furthermore, in some cases, one of your reviewers might ask for a technical review from a Kubernetes tech reviewer when needed. Reviewers will do their best to provide feedback in a timely fashion but response time can vary based on circumstances.
212
304
-->
213
305
还要提醒的一点,有时可能会有不止一个 Kubernetes 评审人为你提供反馈意见。
214
306
有时候,某个评审人的意见和另一个最初被指派的评审人的意见不同。
@@ -220,17 +312,65 @@ Furthermore, in some cases, one of your reviewers might ask for a technical revi
220
312
<!--
221
313
For more information about contributing to the Kubernetes documentation, see:
222
314
223
-
* [Contribute to Kubernetes docs](https://kubernetes.io/docs/contribute/)
If you need help at any point when contributing, the [New Contributor Ambassadors](https://kubernetes.io/docs/contribute/advanced/#serve-as-a-new-contributor-ambassador) are a good point of contact. These are SIG Docs approvers whose responsibilities include mentoring new contributors and helping them through their first few pull requests. The best place to contact the New Contributors Ambassadors would be on the [Kubernetes Slack](https://slack.k8s.io/). Current New Contributors Ambassadors for SIG Docs:
Participation in the Kubernetes community is governed by the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
0 commit comments