From efe536f45a9b6e1ed8c339c84cfa820108ab1ee3 Mon Sep 17 00:00:00 2001 From: Qiming Teng Date: Mon, 27 Jul 2020 16:43:25 +0800 Subject: [PATCH] [zh] Fix links in contribute section This PR fixes bad links found in the contribute section, identified via: ``` ./scripts/linkchecker.py -l zh -f /docs/contribute/**/*.md ``` Fix Summary: Bad links pointing nowhere: 23 Links which should point to localized pages: 28 Links which should avoid redirections: 5 Unsafe links that use HTTP: 6 --- content/en/docs/contribute/participate/_index.md | 2 +- content/zh/docs/contribute/advanced.md | 8 ++++---- .../docs/contribute/generate-ref-docs/_index.md | 2 +- .../generate-ref-docs/contribute-upstream.md | 12 ++++++------ .../docs/contribute/generate-ref-docs/kubectl.md | 12 ++++++------ .../generate-ref-docs/kubernetes-api.md | 12 ++++++------ .../generate-ref-docs/kubernetes-components.md | 12 ++++++------ .../contribute/generate-ref-docs/quickstart.md | 12 ++++++------ content/zh/docs/contribute/localization.md | 8 ++++---- .../zh/docs/contribute/new-content/open-a-pr.md | 2 +- content/zh/docs/contribute/participate/_index.md | 8 ++++---- ...sibilties.md => roles-and-responsibilities.md} | 2 +- .../zh/docs/contribute/review/for-approvers.md | 15 ++++++++------- .../zh/docs/contribute/review/reviewing-prs.md | 14 +++++++------- .../contribute/style/hugo-shortcodes/index.md | 12 +++++++----- .../docs/contribute/style/page-content-types.md | 2 +- content/zh/docs/contribute/style/style-guide.md | 8 +++++--- .../zh/docs/contribute/style/write-new-topic.md | 2 +- 18 files changed, 75 insertions(+), 70 deletions(-) rename content/zh/docs/contribute/participate/{roles-and-responsibilties.md => roles-and-responsibilities.md} (99%) diff --git a/content/en/docs/contribute/participate/_index.md b/content/en/docs/contribute/participate/_index.md index a5c0f2880a..6a86326945 100644 --- a/content/en/docs/contribute/participate/_index.md +++ b/content/en/docs/contribute/participate/_index.md @@ -105,7 +105,7 @@ SIG Docs approvers. Here's how it works. - Any Kubernetes member can add the `lgtm` label by adding a `/lgtm` comment. - Only SIG Docs approvers can merge a pull request by adding an `/approve` comment. Some approvers also perform additional - specific roles, such as [PR Wrangler](/docs/contribute/advanced#be-the-pr-wrangler-for-a-week) or + specific roles, such as [PR Wrangler](/docs/contribute/participate/pr-wranglers/) or [SIG Docs chairperson](#sig-docs-chairperson). diff --git a/content/zh/docs/contribute/advanced.md b/content/zh/docs/contribute/advanced.md index d7a4624438..37f62af369 100644 --- a/content/zh/docs/contribute/advanced.md +++ b/content/zh/docs/contribute/advanced.md @@ -30,11 +30,11 @@ client and other tools for some of these tasks. ## 提出改进建议 -SIG Docs 的 [成员](/zh/docs/contribute/participating/#members) 可以提出改进建议。 +SIG Docs 的 [成员](/zh/docs/contribute/participate/roles-and-responsibilities/#members) 可以提出改进建议。 新的贡献者针对一个或多个 Kubernetes 项目仓库成功提交了 5 个实质性 PR 之后, -就有资格申请 Kubernetes 组织的[成员身份](/zh/docs/contribute/participating#members)。 +就有资格申请 Kubernetes 组织的[成员身份](/zh/docs/contribute/participate/roles-and-responsibilities/#members)。 贡献者的成员资格需要同时得到两位评审人的保荐。 ## 担任 SIG 联合主席 -SIG Docs [批准人(Approvers)](/zh/docs/contribute/participating/#approvers) +SIG Docs [批准人(Approvers)](/zh/docs/contribute/participate/roles-and-responsibilities/#approvers) 可以担任 SIG Docs 的联合主席。 ### 前提条件 diff --git a/content/zh/docs/contribute/generate-ref-docs/_index.md b/content/zh/docs/contribute/generate-ref-docs/_index.md index 7afd3743f5..fc73d84b29 100644 --- a/content/zh/docs/contribute/generate-ref-docs/_index.md +++ b/content/zh/docs/contribute/generate-ref-docs/_index.md @@ -22,5 +22,5 @@ To build the reference documentation, see the following guide: 本节的主题是描述如何生成 Kubernetes 参考指南。 要生成参考文档,请参考下面的指南: -* [生成参考文档快速入门](/docs/contribute/generate-ref-docs/quickstart/) +* [生成参考文档快速入门](/zh/docs/contribute/generate-ref-docs/quickstart/) diff --git a/content/zh/docs/contribute/generate-ref-docs/contribute-upstream.md b/content/zh/docs/contribute/generate-ref-docs/contribute-upstream.md index 4bfa40f0a8..cf7b51cbaf 100644 --- a/content/zh/docs/contribute/generate-ref-docs/contribute-upstream.md +++ b/content/zh/docs/contribute/generate-ref-docs/contribute-upstream.md @@ -29,8 +29,8 @@ API or the `kube-*` components from the upstream code, see the following instruc --> 如果您仅想从上游代码重新生成 Kubernetes API 或 `kube-*` 组件的参考文档。请参考以下说明: -- [生成 Kubernetes API 的参考文档](/docs/contribute/generate-ref-docs/kubernetes-api/) -- [生成 Kubernetes 组件和工具的参考文档](/docs/contribute/generate-ref-docs/kubernetes-components/) +- [生成 Kubernetes API 的参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-api/) +- [生成 Kubernetes 组件和工具的参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-components/) ## {{% heading "prerequisites" %}} @@ -395,7 +395,7 @@ You are now ready to follow the [Generating Reference Documentation for the Kube [published Kubernetes API reference documentation](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/). --> 现在,您可以按照 -[生成 Kubernetes API 的参考文档](/docs/contribute/generate-ref-docs/kubernetes-api/) +[生成 Kubernetes API 的参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-api/) 指南来生成 [已发布的 Kubernetes API 参考文档](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)。 @@ -406,7 +406,7 @@ You are now ready to follow the [Generating Reference Documentation for the Kube * [Generating Reference Docs for Kubernetes Components and Tools](/docs/home/contribute/generated-reference/kubernetes-components/) * [Generating Reference Documentation for kubectl Commands](/docs/home/contribute/generated-reference/kubectl/) --> -* [生成 Kubernetes API 的参考文档](/docs/contribute/generate-ref-docs/kubernetes-api/) -* [为 Kubernetes 组件和工具生成参考文档](/docs/home/contribute/generated-reference/kubernetes-components/) -* [生成 kubectl 命令的参考文档](/docs/home/contribute/generated-reference/kubectl/) +* [生成 Kubernetes API 的参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-api/) +* [为 Kubernetes 组件和工具生成参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-components/) +* [生成 kubectl 命令的参考文档](/zh/docs/contribute/generate-ref-docs/kubectl/) diff --git a/content/zh/docs/contribute/generate-ref-docs/kubectl.md b/content/zh/docs/contribute/generate-ref-docs/kubectl.md index bc0076a4dd..c25f07582d 100644 --- a/content/zh/docs/contribute/generate-ref-docs/kubectl.md +++ b/content/zh/docs/contribute/generate-ref-docs/kubectl.md @@ -35,8 +35,8 @@ reference page, see 本主题描述了如何为 [kubectl 命令](/docs/reference/generated/kubectl/kubectl-commands) 生成参考文档,如 [kubectl apply](/docs/reference/generated/kubectl/kubectl-commands#apply) 和 [kubectl taint](/docs/reference/generated/kubectl/kubectl-commands#taint)。 -本主题没有讨论如何生成 [kubectl](/docs/reference/generated/kubectl/kubectl/) 组件选项的参考页面。 -相关说明请参见[为 Kubernetes 组件和工具生成参考页面](/docs/home/contribute/generated-reference/kubernetes-components/)。 +本主题没有讨论如何生成 [kubectl](/docs/reference/generated/kubectl/kubectl-commands/) 组件选项的参考页面。 +相关说明请参见[为 Kubernetes 组件和工具生成参考页面](/zh/docs/contribute/generate-ref-docs/kubernetes-components/)。 {{< /note >}} ## {{% heading "prerequisites" %}} @@ -412,7 +412,7 @@ topics will be visible in the 对 `kubernetes/website` 仓库创建 PR。跟踪你的 PR,并根据需要回应评审人的评论。 继续跟踪你的 PR,直到它被合入。 -在 PR 合入的几分钟后,你更新的参考主题将出现在[已发布文档](/docs/home/)中。 +在 PR 合入的几分钟后,你更新的参考主题将出现在[已发布文档](/zh/docs/home/)中。 ## {{% heading "whatsnext" %}} @@ -421,7 +421,7 @@ topics will be visible in the * [Generating Reference Documentation for Kubernetes Components and Tools](/docs/contribute/generate-ref-docs/kubernetes-components/) * [Generating Reference Documentation for the Kubernetes API](/docs/contribute/generate-ref-docs/kubernetes-api/) --> -* [生成参考文档快速入门](/docs/home/contribute/generate-ref-docs/quickstart/) -* [为 Kubernetes 组件和工具生成参考文档](/docs/home/contribute/generate-ref-docs/kubernetes-components/) -* [为 Kubernetes API 生成参考文档](/docs/home/contribute/generate-ref-docs/kubernetes-api/) +* [生成参考文档快速入门](/zh/docs/contribute/generate-ref-docs/quickstart/) +* [为 Kubernetes 组件和工具生成参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-components/) +* [为 Kubernetes API 生成参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-api/) diff --git a/content/zh/docs/contribute/generate-ref-docs/kubernetes-api.md b/content/zh/docs/contribute/generate-ref-docs/kubernetes-api.md index 135f8843ef..c000bff384 100644 --- a/content/zh/docs/contribute/generate-ref-docs/kubernetes-api.md +++ b/content/zh/docs/contribute/generate-ref-docs/kubernetes-api.md @@ -31,7 +31,7 @@ Kubernetes API 参考文档是从 构建的,而工具是从 [kubernetes-sigs/reference-docs](https://github.com/kubernetes-sigs/reference-docs) 构建的。 -如果您在生成的文档中发现错误,则需要[在上游修复](/docs/contribute/generate-ref-docs/contribute-upstream/)。 +如果您在生成的文档中发现错误,则需要[在上游修复](/zh/docs/contribute/generate-ref-docs/contribute-upstream/)。 如果您只需要从 [OpenAPI](https://github.com/OAI/OpenAPI-Specification) 规范中重新生成参考文档,请继续阅读此页。 @@ -280,12 +280,12 @@ In `` run `git add` and `git commit` to commit the change. -基于你所生成的更改[创建 PR](/docs/contribute/start/), +基于你所生成的更改[创建 PR](/zh/docs/contribute/new-content/open-a-pr/), 提交到 [kubernetes/website](https://github.com/kubernetes/website) 仓库。 监视您提交的 PR,并根据需要回复 reviewer 的评论。继续监视您的 PR,直到合并为止。 @@ -296,7 +296,7 @@ to monitor your pull request until it has been merged. * [Generating Reference Docs for Kubernetes Components and Tools](/docs/contribute/generate-ref-docs/kubernetes-components/) * [Generating Reference Documentation for kubectl Commands](/docs/contribute/generate-ref-docs/kubectl/) --> -* [生成参考文档快速入门](/docs/home/contribute/generate-ref-docs/quickstart/) -* [为 Kubernetes 组件和工具生成参考文档](/docs/home/contribute/generate-ref-docs/kubernetes-components/) -* [为 kubectl 命令集生成参考文档](/docs/home/contribute/generate-ref-docs/kubectl/) +* [生成参考文档快速入门](/zh/docs/contribute/generate-ref-docs/quickstart/) +* [为 Kubernetes 组件和工具生成参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-components/) +* [为 kubectl 命令集生成参考文档](/zh/docs/contribute/generate-ref-docs/kubectl/) diff --git a/content/zh/docs/contribute/generate-ref-docs/kubernetes-components.md b/content/zh/docs/contribute/generate-ref-docs/kubernetes-components.md index 95b2794047..0ca9d48df6 100644 --- a/content/zh/docs/contribute/generate-ref-docs/kubernetes-components.md +++ b/content/zh/docs/contribute/generate-ref-docs/kubernetes-components.md @@ -23,7 +23,7 @@ This page shows how to build the Kubernetes component and tool reference pages. Start with the [Prerequisites section](/docs/contribute/generate-ref-docs/quickstart/#before-you-begin) in the Reference Documentation Quickstart guide. --> -阅读参考文档快速入门指南中的[准备工作](/docs/contribute/generate-ref-docs/quickstart/#before-you-begin)节。 +阅读参考文档快速入门指南中的[准备工作](/zh/docs/contribute/generate-ref-docs/quickstart/#before-you-begin)节。 @@ -31,7 +31,7 @@ in the Reference Documentation Quickstart guide. Follow the [Reference Documentation Quickstart](/docs/contribute/generate-ref-docs/quickstart/) to generate the Kubernetes component and tool reference pages. --> -按照[参考文档快速入门](/docs/contribute/generate-ref-docs/quickstart/) +按照[参考文档快速入门](/zh/docs/contribute/generate-ref-docs/quickstart/) 指引,生成 Kubernetes 组件和工具的参考文档。 ## {{% heading "whatsnext" %}} @@ -43,8 +43,8 @@ to generate the Kubernetes component and tool reference pages. * [Contributing to the Upstream Kubernetes Project for Documentation](/docs/contribute/generate-ref-docs/contribute-upstream/) --> -* [生成参考文档快速入门](/docs/home/contribute/generate-ref-docs/quickstart/) -* [为 kubectll 命令生成参考文档](/docs/home/contribute/generate-ref-docs/kubectl/) -* [为 Kubernetes API 生成参考文档](/docs/home/contribute/generate-ref-docs/kubernetes-api/) -* [为上游 Kubernetes 项目做贡献以改进文档](/docs/contribute/generate-ref-docs/contribute-upstream/) +* [生成参考文档快速入门](/zh/docs/contribute/generate-ref-docs/quickstart/) +* [为 kubectll 命令生成参考文档](/zh/docs/contribute/generate-ref-docs/kubectl/) +* [为 Kubernetes API 生成参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-api/) +* [为上游 Kubernetes 项目做贡献以改进文档](/zh/docs/contribute/generate-ref-docs/contribute-upstream/) diff --git a/content/zh/docs/contribute/generate-ref-docs/quickstart.md b/content/zh/docs/contribute/generate-ref-docs/quickstart.md index 4011b5f9b8..0c97a99163 100644 --- a/content/zh/docs/contribute/generate-ref-docs/quickstart.md +++ b/content/zh/docs/contribute/generate-ref-docs/quickstart.md @@ -57,7 +57,7 @@ see the [contributing upstream guide](/docs/contribute/generate-ref-docs/contrib {{< note>}} 如果你希望更改构建工具和 API 参考资料,可以阅读 -[上游贡献指南](/docs/contribute/generate-ref-docs/contribute-upstream). +[上游贡献指南](/zh/docs/contribute/generate-ref-docs/contribute-upstream). {{< /note >}} 通过工具导入的单页面的 Markdown 文档必须遵从 -[文档样式指南](/docs/contribute/style/style-guide/)。 +[文档样式指南](/zh/docs/contribute/style/style-guide/)。 要手动设置所需的构造仓库,执行构建目标,以生成各个参考文档,可参考下面的指南: -* [为 Kubernetes 组件和工具生成参考文档](/docs/contribute/generate-ref-docs/kubernetes-components/) -* [为 kubeclt 命令生成参考文档](/docs/contribute/generate-ref-docs/kubectl/) -* [为 Kubernetes API 生成参考文档](/docs/contribute/generate-ref-docs/kubernetes-api/) +* [为 Kubernetes 组件和工具生成参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-components/) +* [为 kubeclt 命令生成参考文档](/zh/docs/contribute/generate-ref-docs/kubectl/) +* [为 Kubernetes API 生成参考文档](/zh/docs/contribute/generate-ref-docs/kubernetes-api/) diff --git a/content/zh/docs/contribute/localization.md b/content/zh/docs/contribute/localization.md index efd57dbdbf..2241265ec2 100644 --- a/content/zh/docs/contribute/localization.md +++ b/content/zh/docs/contribute/localization.md @@ -62,7 +62,7 @@ First, [create your own fork](/docs/contribute/start/#improve-existing-content) ### 派生(fork)并且克隆仓库 {#fork-and-clone-the-repo} 首先,为 [kubernetes/website](https://github.com/kubernetes/website) 仓库 -[创建你自己的副本](/zh/docs/contribute/new-content/new-content/#fork-the-repo)。 +[创建你自己的副本](/zh/docs/contribute/new-content/open-a-pr/#fork-the-repo)。 ### 上游贡献 {#upstream-contributions} -Sig Docs 欢迎对英文原文的[上游贡献和修正](/zh/docs/contribute/intermediate#localize-content)。 +Sig Docs 欢迎对英文原文的上游贡献和修正。 -- 阅读[评阅](/zh/docs/contribute/review/revewing-prs)节,学习评阅过程。 +- 阅读[评阅](/zh/docs/contribute/review/reviewing-prs)节,学习评阅过程。 diff --git a/content/zh/docs/contribute/participate/_index.md b/content/zh/docs/contribute/participate/_index.md index 0c263dd8a8..1fcab79b2a 100644 --- a/content/zh/docs/contribute/participate/_index.md +++ b/content/zh/docs/contribute/participate/_index.md @@ -206,7 +206,7 @@ SIG Docs 批准人。下面是合并的工作机制: - 所有 Kubernetes 成员可以通过 `/lgtm` 评论添加 `lgtm` 标签。 - 只有 SIG Docs 批准人可以通过评论 `/approve` 合并 PR。 某些批准人还会执行一些其他角色,例如 - [PR 管理者](/docs/contribute/advanced#be-the-pr-wrangler-for-a-week) 或 + [PR 管理者](/zh/docs/contribute/participate/pr-wranglers/) 或 [SIG Docs 主席](#sig-docs-chairperson)等。 ## {{% heading "whatsnext" %}} @@ -220,6 +220,6 @@ For more information about contributing to the Kubernetes documentation, see: --> 关于贡献 Kubernetes 文档的更多信息,请参考: -- [贡献新内容](/docs/contribute/overview/) -- [评阅内容](/docs/contribute/review/reviewing-prs) -- [文档样式指南](/docs/contribute/style/) +- [贡献新内容](/zh/docs/contribute/new-content/overview/) +- [评阅内容](/zh/docs/contribute/review/reviewing-prs) +- [文档样式指南](/zh/docs/contribute/style/) diff --git a/content/zh/docs/contribute/participate/roles-and-responsibilties.md b/content/zh/docs/contribute/participate/roles-and-responsibilities.md similarity index 99% rename from content/zh/docs/contribute/participate/roles-and-responsibilties.md rename to content/zh/docs/contribute/participate/roles-and-responsibilities.md index 5fa2a43832..c1359d7171 100644 --- a/content/zh/docs/contribute/participate/roles-and-responsibilties.md +++ b/content/zh/docs/contribute/participate/roles-and-responsibilities.md @@ -58,7 +58,7 @@ For more information, see [contributing new content](/docs/contribute/new-conten [`kubernetes/website`](https://github.com/kubernetes/website) 上报告 Issue。 - 对某 PR 给出无约束力的反馈信息 - 为本地化提供帮助 -- 在 [Slack](http://slack.k8s.io/) 或 +- 在 [Slack](https://slack.k8s.io/) 或 [SIG Docs 邮件列表](https://groups.google.com/forum/#!forum/kubernetes-sig-docs) 上提出改进建议。 diff --git a/content/zh/docs/contribute/review/for-approvers.md b/content/zh/docs/contribute/review/for-approvers.md index 3db894e0b4..b801e7efcf 100644 --- a/content/zh/docs/contribute/review/for-approvers.md +++ b/content/zh/docs/contribute/review/for-approvers.md @@ -15,7 +15,7 @@ weight: 20 -SIG Docs [评阅人(Reviewers)](/docs/contribute/participating/#reviewers) -和[批准人(Approvers)](/docs/contribute/participating/#approvers) +SIG Docs +[评阅人(Reviewers)](/zh/docs/contribute/participate/roles-and-responsibilities/#reviewers) +和[批准人(Approvers)](/zh/docs/contribute/participate/roles-and-responsibilities/#approvers) 在对变更进行评审时需要做一些额外的事情。 每周都有一个特定的文档批准人自愿负责对 PR 进行分类和评阅。 @@ -50,7 +51,7 @@ Everything described in [Reviewing a pull request](/docs/contribute/review/revie Kubernetes 文档遵循 [Kubernetes 代码评阅流程](https://github.com/kubernetes/community/blob/master/contributors/guide/owners.md#the-code-review-process)。 -[评阅 PR](/docs/contribute/review/reviewing-prs) 文档中所描述的所有规程都适用, +[评阅 PR](/zh/docs/contribute/review/reviewing-prs/) 文档中所描述的所有规程都适用, 不过评阅人和批准人还要做以下工作: * 了解 [Hugo](https://gohugo.io/)。 -* 了解 [撰写新的话题](/zh/docs/contribute/write-new-topic/)。 -* 了解 [使用页面类型](/zh/docs/contribute/style/page-content-types/)。 -* 了解 [发起 PR](/zh/docs/contribute/new-content/create-a-pr/)。 +* 了解[撰写新的话题](/zh/docs/contribute/style/write-new-topic/)。 +* 了解[使用页面内容类型](/zh/docs/contribute/style/page-content-types/)。 +* 了解[发起 PR](/zh/docs/contribute/new-content/open-a-pr/)。 +* 了解[高级贡献](/zh/docs/contribute/advanced/)。 diff --git a/content/zh/docs/contribute/style/page-content-types.md b/content/zh/docs/contribute/style/page-content-types.md index 241f440e73..a5526383f5 100644 --- a/content/zh/docs/contribute/style/page-content-types.md +++ b/content/zh/docs/contribute/style/page-content-types.md @@ -354,7 +354,7 @@ An example of a published tutorial topic is 阅读的主题。 已发布的教程主题的一个例子是 -[使用 Deployment 运行无状态应用](/zh/docs/tutorials/stateless-application/run-stateless-application-deployment/). +[使用 Deployment 运行无状态应用](/zh/docs/tasks/run-application/run-stateless-application-deployment/). {{< note >}} -Kubernetes 文档 [Blackfriday Markdown 解释器](https://github.com/russross/blackfriday) -和一些 [Hugo 短代码](/zh/docs/home/contribute/includes/) 来支持词汇表项、Tab +Kubernetes 文档使用带调整的 [Goldmark Markdown 解释器](https://github.com/yuin/goldmark/) +和一些 [Hugo 短代码](/zh/docs/contribute/style/hugo-shortcodes/) 来支持词汇表项、Tab 页以及特性门控标注。 {{< /note >}} diff --git a/content/zh/docs/contribute/style/write-new-topic.md b/content/zh/docs/contribute/style/write-new-topic.md index 4bb8f81254..bd5a2fce72 100644 --- a/content/zh/docs/contribute/style/write-new-topic.md +++ b/content/zh/docs/contribute/style/write-new-topic.md @@ -285,7 +285,7 @@ For an example of a topic that uses this technique, see [Running a Single-Instance Stateful Application](/docs/tutorials/stateful-application/run-stateful-application/). --> 有关使用此技术的主题的示例,请参见 -[运行单实例有状态的应用](/zh/docs/tutorials/stateful-application/run-stateful-application/)。 +[运行单实例有状态的应用](/zh/docs/tasks/run-application/run-single-instance-stateful-application/)。