Skip to content

Commit bec26dd

Browse files
authored
Merge pull request #41629 from windsonsea/linkch
[zh] sync linkchecker/README.md and contribute/_index.md
2 parents 11298c6 + 110485b commit bec26dd

File tree

2 files changed

+54
-54
lines changed

2 files changed

+54
-54
lines changed

content/zh-cn/docs/contribute/_index.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
---
22
content_type: concept
3-
title: Kubernetes 文档出一份力
3+
title: K8s 文档出一份力
44
linktitle: 贡献
55
main_menu: true
66
no_list: true
77
weight: 80
88
card:
99
name: contribute
1010
weight: 10
11-
title: 开始为 Kubernetes 做贡献
11+
title: 开始为 K8s 做贡献
1212
---
1313
<!--
14-
---
1514
content_type: concept
16-
title: Contribute to Kubernetes docs
15+
title: Contribute to K8s docs
1716
linktitle: Contribute
1817
main_menu: true
1918
no_list: true
@@ -22,28 +21,25 @@ card:
2221
name: contribute
2322
weight: 10
2423
title: Start contributing to K8s
25-
---
2624
-->
2725

2826
<!-- overview -->
2927

3028
<!--
3129
*Kubernetes welcomes improvements from all contributors, new and experienced!*
3230
-->
33-
*Kubernetes 欢迎来自所有贡献者的改进,无论你是新人和有经验的贡献者!*
31+
**Kubernetes 欢迎来自所有贡献者的改进,无论你是新人和有经验的贡献者!**
3432

35-
<!--
3633
{{< note >}}
34+
<!--
3735
To learn more about contributing to Kubernetes in general, see the
3836
[contributor documentation](http://www.kubernetes.dev/docs/).
3937
4038
You can also read the
4139
{{< glossary_tooltip text="CNCF" term_id="cncf" >}}
4240
[page](http://contribute.cncf.io/contributors/projects/#kubernetes)
4341
about contributing to Kubernetes.
44-
{{< /note >}}
4542
-->
46-
{{< note >}}
4743
要了解有关为 Kubernetes 做出贡献的更多信息,请参阅
4844
[贡献者文档](http://www.kubernetes.dev/docs/)
4945

@@ -88,7 +84,8 @@ to work effectively in the Kubernetes community.
8884

8985
任何人都可以提出文档方面的问题(issue),或贡献一个变更,用拉取请求(PR)的方式提交到
9086
[GitHub 上的 `kubernetes/website` 仓库](http://github.com/kubernetes/website)
91-
当然你需要熟练使用 [git](http://git-scm.com/)[GitHub](http://lab.github.com/) 才能在 Kubernetes 社区中有效工作。
87+
当然你需要熟练使用 [git](http://git-scm.com/)[GitHub](http://lab.github.com/)
88+
才能在 Kubernetes 社区中有效工作。
9289

9390
<!--
9491
To get involved with documentation:
@@ -104,7 +101,8 @@ To get involved with documentation:
104101

105102
1. 签署 CNCF 的[贡献者许可协议](http://github.com/kubernetes/community/blob/master/CLA.md)
106103
2. 熟悉[文档仓库](http://github.com/kubernetes/website)和网站的[静态站点生成器](http://gohugo.io)
107-
3. 确保理解[发起 PR](/zh-cn/docs/contribute/new-content/open-a-pr/)[审查变更](/zh-cn/docs/contribute/review/reviewing-prs/)的基本流程。
104+
3. 确保理解[发起 PR](/zh-cn/docs/contribute/new-content/open-a-pr/)
105+
[审查变更](/zh-cn/docs/contribute/review/reviewing-prs/)的基本流程。
108106

109107
<!-- See http://github.com/kubernetes/website/issues/28808 for live-editor URL to this figure -->
110108
<!-- You can also cut/paste the mermaid code into the live editor at http://mermaid-js.github.io/mermaid-live-editor to play around with it -->
@@ -235,11 +233,11 @@ Figure 2. Preparation for your first contribution.
235233
检索最适合作为切入点的问题。
236234
- 在现有文档上,[使用 GitHub 提交 PR](/zh-cn/docs/contribute/new-content/open-a-pr/#changes-using-github)
237235
掌握在 GitHub 上登记 Issue 的方法。
238-
- Kubernetes 社区其他成员会[评审 PR ](/zh-cn/docs/contribute/review/reviewing-prs/)
236+
- Kubernetes 社区其他成员会[评审 PR](/zh-cn/docs/contribute/review/reviewing-prs/)
239237
以确保文档精准和语言流畅。
240238
- 阅读 kubernetes 的[内容指南](/zh-cn/docs/contribute/style/content-guide/)
241239
[风格指南](/zh-cn/docs/contribute/style/style-guide/),以发表有见地的评论。
242-
- 了解[页面内容类型](/zh-cn/docs/contribute/style/page-content-types/)
240+
- 了解[页面内容类型](/zh-cn/docs/contribute/style/page-content-types/)
243241
[Hugo 短代码](/zh-cn/docs/contribute/style/hugo-shortcodes/)
244242

245243
<!--
@@ -250,16 +248,16 @@ Figure 2. Preparation for your first contribution.
250248
- Document [features in a release](/docs/contribute/new-content/new-features/).
251249
- Participate in [SIG Docs](/docs/contribute/participate/), and become a
252250
[member or reviewer](/docs/contribute/participate/roles-and-responsibilities/).
253-
251+
254252
- Start or help with a [localization](/docs/contribute/localization/).
255253
-->
256254
## 下一步 {#next-teps}
257255

258256
- 学习在仓库的[本地克隆中工作](/zh-cn/docs/contribute/new-content/open-a-pr/#fork-the-repo)
259257
-[发行版的特性](/zh-cn/docs/contribute/new-content/new-features/)编写文档。
260-
- 加入 [SIG Docs](/zh-cn/docs/contribute/participate/)并成为[成员或评审者](/zh-cn/docs/contribute/participate/roles-and-responsibilities/)
261-
262-
- 开始或帮助[本地化](/zh-cn/docs/contribute/localization/) 工作。
258+
- 加入 [SIG Docs](/zh-cn/docs/contribute/participate/)
259+
并成为[成员或评审者](/zh-cn/docs/contribute/participate/roles-and-responsibilities/)
260+
- 开始或帮助[本地化](/zh-cn/docs/contribute/localization/)工作。
263261

264262
<!--
265263
## Get involved with SIG Docs
@@ -277,6 +275,7 @@ SIG Docs communicates with different methods:
277275
参与 SIG Docs 是 Kubernetes 贡献者(开发者和其他人员)对 Kubernetes 项目产生重大影响力的好方式。
278276

279277
SIG Docs 的几种沟通方式:
278+
280279
<!--
281280
- [Join `#sig-docs` on the Kubernetes Slack instance](http://slack.k8s.io/). Make sure to
282281
introduce yourself!
@@ -285,9 +284,9 @@ SIG Docs 的几种沟通方式:
285284
- Join the [SIG Docs video meeting](http://github.com/kubernetes/community/tree/master/sig-docs) held every two weeks. Meetings are always announced on `#sig-docs` and added to the [Kubernetes community meetings calendar](http://calendar.google.com/calendar/embed?src=cgnt364vd8s86hr2phapfjc6uk%40group.calendar.google.com&ctz=America/Los_Angeles). You'll need to download the [Zoom client](http://zoom.us/download) or dial in using a phone.
286285
- Join the SIG Docs async Slack standup meeting on those weeks when the in-person Zoom video meeting does not take place. Meetings are always announced on `#sig-docs`. You can contribute to any one of the threads up to 24 hours after meeting announcement.
287286
-->
288-
- [加入 Kubernetes 在 Slack 上的`#sig-docs` 频道](http://slack.k8s.io/)
287+
- [加入 Kubernetes 在 Slack 上的 `#sig-docs` 频道](http://slack.k8s.io/)
289288
一定记得自我介绍!
290-
- [加入 `kubernetes-sig-docs` 邮件列表](http://groups.google.com/forum/#!forum/kubernetes-sig-docs),
289+
- [加入 `kubernetes-sig-docs` 邮件列表](http://groups.google.com/forum/#!forum/kubernetes-sig-docs)
291290
这里有更广泛的讨论,和官方决策的记录。
292291
- 参加每两周召开一次的 [SIG Docs 视频会议](http://github.com/kubernetes/community/tree/master/sig-docs)
293292
会议总是在 `#sig-docs` 上发出公告,同时添加到
Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<!--
22
# Internal link checking tool
3-
-->
3+
-->
44
# 内置链接检查工具
55

66
<!--
77
You can use [htmltest](http://github.com/wjdp/htmltest) to check for broken links in [`/content/en/`](http://git.k8s.io/website/content/en/). This is useful when refactoring sections of content, moving pages around, or renaming files or page headers.
8-
-->
8+
-->
99
你可以使用 [htmltest](http://github.com/wjdp/htmltest) 来检查
1010
[`/content/en/`](http://git.k8s.io/website/content/en/) 下面的失效链接。
1111
这在重构章节内容、移动页面或者重命名文件或页眉时非常有用。
1212

1313
<!--
1414
## How the tool works
15-
-->
16-
## 工作原理
15+
-->
16+
## 工作原理 {#how-the-tool-works}
1717

1818
<!--
1919
`htmltest` scans links in the generated HTML files of the kubernetes website repository. It runs using a `make` command which does the following:
20-
-->
21-
`htmltest` 会扫描 kubernetes website 仓库构建生成的 HTML 文件。通过执行 `make` 命令进行了下列操作:
20+
-->
21+
`htmltest` 会扫描 Kubernetes website 仓库构建生成的 HTML 文件。通过执行 `make` 命令进行了下列操作:
2222

2323
<!--
2424
- Builds the site and generates output HTML in the `/public` directory of your local `kubernetes/website` repository
@@ -33,15 +33,15 @@ You can use [htmltest](http://github.com/wjdp/htmltest) to check for broken lin
3333

3434
<!--
3535
## What it does and doesn't check
36-
-->
37-
## 哪些链接不会检查
36+
-->
37+
## 哪些链接不会检查 {#what-it-does-and-doesnot-check}
3838

3939
<!--
4040
The link checker scans generated HTML files, not raw Markdown. The htmltest tool depends on a configuration file, [`.htmltest.yml`](http://git.k8s.io/website/.htmltest.yml), to determine which content to examine.
4141
4242
The link checker scans the following:
43-
-->
44-
该链接检查器扫描生成的 HTML 文件,而非原始的 Markdown. 该 htmltest 工具依赖于配置文件
43+
-->
44+
该链接检查器扫描生成的 HTML 文件,而非原始的 Markdown该 htmltest 工具依赖于配置文件
4545
[`.htmltest.yml`](http://git.k8s.io/website/.htmltest.yml),来决定检查哪些内容。
4646

4747
该链接检查器扫描以下内容:
@@ -52,16 +52,17 @@ The link checker scans the following:
5252
- All internal links, excluding:
5353
- Empty hashes (`<a href="#">` or `[title](#)`) and empty hrefs (`<a href="">` or `[title]()`)
5454
- Internal links to images and other media files
55-
-->
56-
- 所有由 [`/content/en/docs`](http://git.k8s.io/website/content/en/docs/) 目录下的 Markdown 文件生成的内容,但不包括:
55+
-->
56+
- 所有由 [`/content/en/docs`](http://git.k8s.io/website/content/en/docs/)
57+
目录下的 Markdown 文件生成的内容,但不包括:
5758
- 生成的 API 参考,例如 http://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
5859
- 所有的内部链接,但不包括:
59-
- 空白锚点 (`<a href="#">``[title](#)`) 以及空白目标地址 (`<a href="">``[title]()`)
60+
- 空白锚点 (`<a href="#">``[title](#)`) 以及空白目标地址 (`<a href="">``[title]()`)
6061
- 指向图片或其他媒体文件的内部链接
6162

6263
<!--
6364
The link checker does not scan the following:
64-
-->
65+
-->
6566
该链接检查器不会扫描以下内容:
6667

6768
<!--
@@ -70,7 +71,7 @@ The link checker does not scan the following:
7071
- Blog posts
7172
- API Reference documentation, for example: http://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/
7273
- Localizations
73-
-->
74+
-->
7475
- 包含在顶部和侧边导航栏的链接,以及页脚链接或者页面的 `<head>` 部分中的链接,例如 CSS 样式表、脚本以及元信息的链接。
7576
- 顶级页面及其子页面,例如:`/training``/community``/case-studies/adidas`
7677
- 博客文章
@@ -79,47 +80,47 @@ The link checker does not scan the following:
7980

8081
<!--
8182
## Prerequisites and installation
82-
-->
83-
## 先决条件以及安装说明
83+
-->
84+
## 先决条件以及安装说明 {#prerequisites-and-installation}
8485

8586
<!--
8687
You must install
87-
-->
88+
-->
8889
必须安装:
8990
* [Docker](http://docs.docker.com/get-docker/)
9091
* [make](http://www.gnu.org/software/make/)
9192

9293
<!--
9394
## Running the link checker
94-
-->
95-
## 运行链接检查器
95+
-->
96+
## 运行链接检查器 {#running-link-checker}
9697

9798
<!--
9899
To run the link checker:
99-
-->
100+
-->
100101
运行链接检查器需要:
101102

102103
<!--
103104
1. Navigate to the root directory of your local `kubernetes/website` repository.
104105
105106
2. Run the following command:
106-
-->
107+
-->
107108
1. 进入本地 `kubernetes/website` 仓库的根目录下。
108109

109110
2. 执行如下命令:
110111

111-
```
112-
make container-internal-linkcheck
113-
```
112+
```
113+
make container-internal-linkcheck
114+
```
114115

115116
<!--
116117
## Understanding the output
117-
-->
118-
## 理解输出的内容
118+
-->
119+
## 理解输出的内容 {#understanding-output}
119120

120121
<!--
121122
If the link checker finds broken links, the output is similar to the following:
122-
-->
123+
-->
123124
如果链接检查器发现了失效链接,则输出内容类似如下:
124125

125126
```
@@ -138,12 +139,12 @@ The tool gives a reason: `hash does not exist`. In most cases, you can ignore th
138139
The target URL is `#preserving-unknown-fields`.
139140
140141
One way to fix this is to:
141-
-->
142+
-->
142143
这是一系列失效链接。该日志附带了每个页面下的失效链接。
143144

144145
在这部分输出中,包含失效链接的文件是 `tasks/access-kubernetes-api/custom-resources.md`
145146

146-
该工具给出了一个理由:`hash does not exist`在大部分情况下,你可以忽略这个。
147+
该工具给出了一个理由:`hash does not exist`在大部分情况下,你可以忽略这个。
147148

148149
目标链接是 `#preserving-unknown-fields`
149150

@@ -153,12 +154,12 @@ One way to fix this is to:
153154
1. Navigate to the Markdown file with a broken link.
154155
2. Using a text editor, do a full-text search (usually Ctrl+F or Command+F) for the broken link's URL, `#preserving-unknown-fields`.
155156
3. Fix the link. For a broken page hash (or _anchor_) link, check whether the topic was renamed or removed.
156-
-->
157+
-->
157158
1. 转到含有失效链接的 Markdown 文件。
158-
2. 使用文本编辑器全文搜索失效链接的 URL(通常使用 Ctrl+F 或 Command+F)`#preserving-unknown-fields`.
159-
3. 修复该链接。对于一个失效的锚点(或者 _anchor_ )链接,检查该主题是否已更名或者移除。
159+
2. 使用文本编辑器全文搜索失效链接的 URL(通常使用 Ctrl+F 或 Command+F)`#preserving-unknown-fields`
160+
3. 修复该链接。对于一个失效的锚点(或者 **anchor**)链接,检查该主题是否已更名或者移除。
160161

161162
<!--
162163
Run htmltest to verify that broken links are fixed.
163-
-->
164-
运行 htmltest 来验证失效链接是否已修复。
164+
-->
165+
运行 htmltest 来验证失效链接是否已修复。

0 commit comments

Comments
 (0)