From 005fce03fef7ced2d910304c4089528e7a64de98 Mon Sep 17 00:00:00 2001 From: Andrew Chen Date: Mon, 10 Apr 2017 13:24:14 -0700 Subject: [PATCH] WIP: Cleanup /docs/contribute/ migration (#3278) * WIP: Cleanup /docs/contribute/ migration * #3278 Changing /docs/contribute to /docs/home/contribute (#3285) * WIP: #3278 Adding redirects /docs/contribute/ /docs/home/contribute/ * WIP: #3278 modifying /docs/contribute/ paths within files to /docs/home/contribute/ * Revert "WIP: #3278 Adding redirects /docs/contribute/ /docs/home/contribute/" This reverts commit a82efdee505d7a409cb3c86240cc0ee976a2e566. * WIP: #3278 Adding redirects /docs/contribute/ /docs/home/contribute/ * WIP: #3278 Correcting syntax mistake in redirect.js * WIP: #3278 Correcting another syntax mistake in redirect.js * WIP: #3278 Removing deprecated files so redirects work * Removing the # * WIP: #3278 Updating pattern in redirect.js * WIP: #3278 Removed the wrong # previously redirect.js --- CONTRIBUTING.md | 4 ++-- README.md | 10 +++++----- _data/support.yml | 12 ++++++------ docs/concepts/index.md | 2 +- docs/contribute/README.md | 1 + docs/contribute/create-pull-request.md | 7 ------- docs/contribute/page-templates.md | 10 ---------- docs/contribute/review-issues.md | 7 ------- docs/contribute/stage-documentation-changes.md | 7 ------- docs/contribute/style-guide.md | 7 ------- docs/contribute/write-new-topic.md | 7 ------- docs/home/contribute/create-pull-request.md | 10 +++++----- docs/home/contribute/review-issues.md | 6 +++--- docs/home/contribute/stage-documentation-changes.md | 8 ++++---- docs/home/contribute/style-guide.md | 12 ++++++------ docs/home/contribute/write-new-topic.md | 10 +++++----- docs/tasks/index.md | 2 +- docs/tutorials/index.md | 2 +- editdocs.md | 10 +++++----- js/redirects.js | 6 ++++++ skip_title_check.txt | 3 ++- skip_toc_check.txt | 3 ++- verify-docs-format.sh | 2 +- 23 files changed, 56 insertions(+), 92 deletions(-) create mode 100644 docs/contribute/README.md delete mode 100644 docs/contribute/create-pull-request.md delete mode 100644 docs/contribute/page-templates.md delete mode 100644 docs/contribute/review-issues.md delete mode 100644 docs/contribute/stage-documentation-changes.md delete mode 100644 docs/contribute/style-guide.md delete mode 100644 docs/contribute/write-new-topic.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 934d7947aeb45..ed6b34833853d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,7 @@ The [Kubernetes SIG Docs Discussion Group](https://groups.google.com/forum/#!for ### Style Guides and Templates -Before submitting a pull request to create new content, please review the [Kubernetes.io style guide](http://kubernetes.io/docs/contribute/style-guide/) and follow the [instructions for using page templates](http://kubernetes.io/docs/contribute/page-templates/). +Before submitting a pull request to create new content, please review the [Kubernetes.io style guide](http://kubernetes.io/docs/home/contribute/style-guide/) and follow the [instructions for using page templates](http://kubernetes.io/docs/home/contribute/page-templates/). ## Contributing to Documentation @@ -33,4 +33,4 @@ Note that code issues should be filed against the main kubernetes repository, wh ### Submitting Documentation Pull Requests -If you're fixing an issue in the existing documentation, you should submit a PR against the master branch. Follow [these instructions to create a documentation pull request against the kubernetes.io repository](http://kubernetes.io/docs/contribute/create-pull-request/). +If you're fixing an issue in the existing documentation, you should submit a PR against the master branch. Follow [these instructions to create a documentation pull request against the kubernetes.io repository](http://kubernetes.io/docs/home/contribute/create-pull-request/). diff --git a/README.md b/README.md index 264822b1dff52..dbac6f22b9efd 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ You can click the **Fork** button in the upper-right area of the screen to creat For more information about contributing to the Kubernetes documentation, see: * [Contributing to the Kubernetes Documentation](http://kubernetes.io/editdocs/) -* [Creating a Documentation Pull Request](http://kubernetes.io/docs/contribute/create-pull-request/) -* [Writing a New Topic](http://kubernetes.io/docs/contribute/write-new-topic/) -* [Staging Your Documentation Changes](http://kubernetes.io/docs/contribute/stage-documentation-changes/) -* [Using Page Templates](http://kubernetes.io/docs/contribute/page-templates/) -* [Documentation Style Guide](http://kubernetes.io/docs/contribute/style-guide/) +* [Creating a Documentation Pull Request](http://kubernetes.io/docs/home/contribute/create-pull-request/) +* [Writing a New Topic](http://kubernetes.io/docs/home/contribute/write-new-topic/) +* [Staging Your Documentation Changes](http://kubernetes.io/docs/home/contribute/stage-documentation-changes/) +* [Using Page Templates](http://kubernetes.io/docs/home/contribute/page-templates/) +* [Documentation Style Guide](http://kubernetes.io/docs/home/contribute/style-guide/) ## Thank you! diff --git a/_data/support.yml b/_data/support.yml index e40d89ed4731b..1c1307fd98a3d 100644 --- a/_data/support.yml +++ b/_data/support.yml @@ -23,12 +23,12 @@ toc: - title: Contributing to the Kubernetes Docs section: - editdocs.md - - docs/contribute/create-pull-request.md - - docs/contribute/write-new-topic.md - - docs/contribute/stage-documentation-changes.md - - docs/contribute/page-templates.md - - docs/contribute/review-issues.md - - docs/contribute/style-guide.md + - docs/home/contribute/create-pull-request.md + - docs/home/contribute/write-new-topic.md + - docs/home/contribute/stage-documentation-changes.md + - docs/home/contribute/page-templates.md + - docs/home/contribute/review-issues.md + - docs/home/contribute/style-guide.md - title: Other Resources section: diff --git a/docs/concepts/index.md b/docs/concepts/index.md index 50c8f5bb265d8..b2bf610e77e59 100644 --- a/docs/concepts/index.md +++ b/docs/concepts/index.md @@ -59,5 +59,5 @@ The nodes in a cluster are the machines (VMs, physical servers, etc) that run yo ### What's next If you would like to write a concept page, see -[Using Page Templates](/docs/contribute/page-templates/) +[Using Page Templates](/docs/home/contribute/page-templates/) for information about the concept page type and the concept template. diff --git a/docs/contribute/README.md b/docs/contribute/README.md new file mode 100644 index 0000000000000..fd8137c3e776d --- /dev/null +++ b/docs/contribute/README.md @@ -0,0 +1 @@ +This directory is deprecated and its contents have been moved to /docs/home/contribute/. \ No newline at end of file diff --git a/docs/contribute/create-pull-request.md b/docs/contribute/create-pull-request.md deleted file mode 100644 index 2e5071753b7bc..0000000000000 --- a/docs/contribute/create-pull-request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Creating a Documentation Pull Request ---- - -{% include support-content-moved.md %} - -[Creating a Documentation Pull Request](/docs/home/contribute/create-pull-request/) diff --git a/docs/contribute/page-templates.md b/docs/contribute/page-templates.md deleted file mode 100644 index d4702db4ab3d8..0000000000000 --- a/docs/contribute/page-templates.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -redirect_from: -- "/docs/templatedemos/" -- "/docs/templatedemos.html" -title: Using Page Templates ---- - -{% include support-content-moved.md %} - -[Using Page Templates](/docs/home/contribute/page-templates/) diff --git a/docs/contribute/review-issues.md b/docs/contribute/review-issues.md deleted file mode 100644 index 0fe70e089a102..0000000000000 --- a/docs/contribute/review-issues.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Reviewing Documentation Issues ---- - -{% include support-content-moved.md %} - -[Reviewing Documentation Issues](/docs/home/contribute/review-issues/) diff --git a/docs/contribute/stage-documentation-changes.md b/docs/contribute/stage-documentation-changes.md deleted file mode 100644 index 906dbb3161049..0000000000000 --- a/docs/contribute/stage-documentation-changes.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Staging Your Documentation Changes ---- - -{% include support-content-moved.md %} - -[Staging Your Documentation Changes](/docs/home/contribute/stage-documentation-changes/) diff --git a/docs/contribute/style-guide.md b/docs/contribute/style-guide.md deleted file mode 100644 index 66af83d4ad866..0000000000000 --- a/docs/contribute/style-guide.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Documentation Style Guide ---- - -{% include support-content-moved.md %} - -[Documentation Style Guide](/docs/home/contribute/style-guide/) diff --git a/docs/contribute/write-new-topic.md b/docs/contribute/write-new-topic.md deleted file mode 100644 index 09492ae5a7a6b..0000000000000 --- a/docs/contribute/write-new-topic.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: Writing a New Topic ---- - -{% include support-content-moved.md %} - -[Writing a New Topic](/docs/home/contribute/write-new-topic/) diff --git a/docs/home/contribute/create-pull-request.md b/docs/home/contribute/create-pull-request.md index 7ed2b2b953210..5512d30acb5df 100644 --- a/docs/home/contribute/create-pull-request.md +++ b/docs/home/contribute/create-pull-request.md @@ -39,9 +39,9 @@ is called a *fork*. a new branch to use for your contribution. 1. In your new branch, make your changes and commit them. If you want to -[write a new topic](/docs/contribute/write-new-topic/), +[write a new topic](/docs/home/contribute/write-new-topic/), choose the -[page type](/docs/contribute/page-templates/) +[page type](/docs/home/contribute/page-templates/) that is the best fit for your content. ## Submitting a pull request to the master branch (Current Release) @@ -90,9 +90,9 @@ next upcoming release. It's automatically updated as new PRs get merged. {% endcapture %} {% capture whatsnext %} -* Learn about [writing a new topic](/docs/contribute/write-new-topic). -* Learn about [using page templates](/docs/contribute/page-templates/). -* Learn about [staging your changes](/docs/contribute/stage-documentation-changes). +* Learn about [writing a new topic](/docs/home/contribute/write-new-topic). +* Learn about [using page templates](/docs/home/contribute/page-templates/). +* Learn about [staging your changes](/docs/home/contribute/stage-documentation-changes). {% endcapture %} {% include templates/task.md %} diff --git a/docs/home/contribute/review-issues.md b/docs/home/contribute/review-issues.md index 1353620e81d22..d6cc0bdb01217 100644 --- a/docs/home/contribute/review-issues.md +++ b/docs/home/contribute/review-issues.md @@ -65,9 +65,9 @@ Depending on where the dead link is reported, different actions are required to {% capture whatsnext %} -* Learn about [writing a new topic](/docs/contribute/write-new-topic). -* Learn about [using page templates](/docs/contribute/page-templates/). -* Learn about [staging your changes](/docs/contribute/stage-documentation-changes). +* Learn about [writing a new topic](/docs/home/contribute/write-new-topic). +* Learn about [using page templates](/docs/home/contribute/page-templates/). +* Learn about [staging your changes](/docs/home/contribute/stage-documentation-changes). {% endcapture %} {% include templates/concept.md %} diff --git a/docs/home/contribute/stage-documentation-changes.md b/docs/home/contribute/stage-documentation-changes.md index ffedd13da2bd3..38a7f4f44cff1 100644 --- a/docs/home/contribute/stage-documentation-changes.md +++ b/docs/home/contribute/stage-documentation-changes.md @@ -9,7 +9,7 @@ to the Kubernetes documentation. {% capture prerequisites %} Create a fork of the Kubernetes documentation repository as described in -[Creating a Documentation Pull Request](/docs/contribute/create-pull-request/). +[Creating a Documentation Pull Request](/docs/home/contribute/create-pull-request/). {% endcapture %} {% capture steps %} @@ -101,9 +101,9 @@ web server: {% endcapture %} {% capture whatsnext %} -* Learn about [writing a new topic](/docs/contribute/write-new-topic/). -* Learn about [using page templates](/docs/contribute/page-templates/). -* Learn about [creating a pull request](/docs/contribute/create-pull-request/). +* Learn about [writing a new topic](/docs/home/contribute/write-new-topic/). +* Learn about [using page templates](/docs/home/contribute/page-templates/). +* Learn about [creating a pull request](/docs/home/contribute/create-pull-request/). {% endcapture %} {% include templates/task.md %} diff --git a/docs/home/contribute/style-guide.md b/docs/home/contribute/style-guide.md index d44cab2ea4742..641d56c264018 100644 --- a/docs/home/contribute/style-guide.md +++ b/docs/home/contribute/style-guide.md @@ -9,8 +9,8 @@ propose changes to this document in a pull request. For additional information on creating new content for the Kubernetes docs, follow the instructions on -[using page templates](/docs/contribute/page-templates/) and -[creating a documentation pull request](/docs/contribute/create-pull-request/). +[using page templates](/docs/home/contribute/page-templates/) and +[creating a documentation pull request](/docs/home/contribute/create-pull-request/). {% endcapture %} {% capture body %} @@ -227,10 +227,10 @@ considered new in a few months. {% capture whatsnext %} -* Learn about [writing a new topic](/docs/contribute/write-new-topic/). -* Learn about [using page templates](/docs/contribute/page-templates/). -* Learn about [staging your changes](/docs/contribute/stage-documentation-changes/) -* Learn about [creating a pull request](/docs/contribute/create-pull-request/). +* Learn about [writing a new topic](/docs/home/contribute/write-new-topic/). +* Learn about [using page templates](/docs/home/contribute/page-templates/). +* Learn about [staging your changes](/docs/home/contribute/stage-documentation-changes/) +* Learn about [creating a pull request](/docs/home/contribute/create-pull-request/). {% endcapture %} {% include templates/concept.md %} diff --git a/docs/home/contribute/write-new-topic.md b/docs/home/contribute/write-new-topic.md index 52256390da2fb..dc4ceb30f4511 100644 --- a/docs/home/contribute/write-new-topic.md +++ b/docs/home/contribute/write-new-topic.md @@ -8,7 +8,7 @@ This page shows how to create a new topic for the Kubernetes docs. {% capture prerequisites %} Create a fork of the Kubernetes documentation repository as described in -[Creating a Documentation Pull Request](/docs/contribute/create-pull-request/). +[Creating a Documentation Pull Request](/docs/home/contribute/create-pull-request/). {% endcapture %} {% capture steps %} @@ -38,7 +38,7 @@ is the best fit for your content: Each page type has a -[template](/docs/contribute/page-templates/) +[template](/docs/home/contribute/page-templates/) that you can use as you write your topic. Using templates helps ensure consistency among topics of a given type. @@ -135,9 +135,9 @@ image format is SVG. {% endcapture %} {% capture whatsnext %} -* Learn about [using page templates](/docs/contribute/page-templates/). -* Learn about [staging your changes](/docs/contribute/stage-documentation-changes). -* Learn about [creating a pull request](/docs/contribute/create-pull-request/). +* Learn about [using page templates](/docs/home/contribute/page-templates/). +* Learn about [staging your changes](/docs/home/contribute/stage-documentation-changes). +* Learn about [creating a pull request](/docs/home/contribute/create-pull-request/). {% endcapture %} {% include templates/task.md %} diff --git a/docs/tasks/index.md b/docs/tasks/index.md index da0bd603ac7b8..689d5b1379abf 100644 --- a/docs/tasks/index.md +++ b/docs/tasks/index.md @@ -74,5 +74,5 @@ single thing, typically by giving a short sequence of steps. ### What's next If you would like to write a task page, see -[Creating a Documentation Pull Request](/docs/contribute/create-pull-request/). +[Creating a Documentation Pull Request](/docs/home/contribute/create-pull-request/). diff --git a/docs/tutorials/index.md b/docs/tutorials/index.md index 25b8cca32e37d..6a750a37bf69c 100644 --- a/docs/tutorials/index.md +++ b/docs/tutorials/index.md @@ -42,5 +42,5 @@ each of which has a sequence of steps. ### What's next If you would like to write a tutorial, see -[Using Page Templates](/docs/contribute/page-templates/) +[Using Page Templates](/docs/home/contribute/page-templates/) for information about the tutorial page type and the tutorial template. diff --git a/editdocs.md b/editdocs.md index 331c526bd42f5..8af1cf4b3937f 100644 --- a/editdocs.md +++ b/editdocs.md @@ -46,8 +46,8 @@ $( document ).ready(function() { For more information about contributing to the Kubernetes documentation, see: -* [Creating a Documentation Pull Request](http://kubernetes.io/docs/contribute/create-pull-request/) -* [Writing a New Topic](http://kubernetes.io/docs/contribute/write-new-topic/) -* [Staging Your Documentation Changes](http://kubernetes.io/docs/contribute/stage-documentation-changes/) -* [Using Page Templates](http://kubernetes.io/docs/contribute/page-templates/) -* [Documentation Style Guide](http://kubernetes.io/docs/contribute/style-guide/) +* [Creating a Documentation Pull Request](http://kubernetes.io/docs/home/contribute/create-pull-request/) +* [Writing a New Topic](http://kubernetes.io/docs/home/contribute/write-new-topic/) +* [Staging Your Documentation Changes](http://kubernetes.io/docs/home/contribute/stage-documentation-changes/) +* [Using Page Templates](http://kubernetes.io/docs/home/contribute/page-templates/) +* [Documentation Style Guide](http://kubernetes.io/docs/home/contribute/style-guide/) diff --git a/js/redirects.js b/js/redirects.js index 5755a51245ad1..88ab1fee4e44d 100644 --- a/js/redirects.js +++ b/js/redirects.js @@ -12,6 +12,12 @@ $( document ).ready(function() { "pattern":"kubectl_(\\w+)", "to":"/docs/user-guide/kubectl/v1.6", "postfix":"/#" + }, + { + "from":"/docs/contribute/", + "pattern":"\/contribute\/([0-9a-zA-Z\-\_]+)", + "to":"/docs/home/contribute", + "postfix":"/" }]; var doRedirect = false; var notHere = false; diff --git a/skip_title_check.txt b/skip_title_check.txt index 90ac6482c597b..2d43e9bf593e3 100644 --- a/skip_title_check.txt +++ b/skip_title_check.txt @@ -9,4 +9,5 @@ docs/api-reference/v1/definitions.md docs/api-reference/v1/operations.md docs/user-guide/pods/_viewing-a-pod.md docs/user-guide/simple-yaml.md -docs/concepts/abstractions/pod-termination.md \ No newline at end of file +docs/concepts/abstractions/pod-termination.md +docs/contribute/README.md \ No newline at end of file diff --git a/skip_toc_check.txt b/skip_toc_check.txt index e7fc29f479773..f1c75c979383f 100644 --- a/skip_toc_check.txt +++ b/skip_toc_check.txt @@ -63,5 +63,6 @@ docs/user-guide/federation/secrets.md docs/home/security.md docs/home/deprecation-policy.md - docs/whatisk8s.md + +docs/contribute/README.md \ No newline at end of file diff --git a/verify-docs-format.sh b/verify-docs-format.sh index 432e733857b43..dfdf4bbac3cf0 100755 --- a/verify-docs-format.sh +++ b/verify-docs-format.sh @@ -52,7 +52,7 @@ for file in `find docs -name "*.md" -type f`; do done if ${no_entry}; then - echo "Found ${no_entry_counter} files without entries. For how to fix it, see http://kubernetes.io/docs/contribute/write-new-topic/#creating-an-entry-in-the-table-of-contents" + echo "Found ${no_entry_counter} files without entries. For how to fix it, see http://kubernetes.io/docs/home/contribute/write-new-topic/#creating-an-entry-in-the-table-of-contents" exit 1 fi