diff --git a/_data/reference.yml b/_data/reference.yml index 3cdd91de6e..ae6e38b363 100644 --- a/_data/reference.yml +++ b/_data/reference.yml @@ -63,7 +63,7 @@ toc: - title: kubectl Commands section: - title: kubectl - path: /docs/user-guide/kubectl/kubectl/ + path: /docs/user-guide/kubectl/ - title: kubectl annotate path: /docs/user-guide/kubectl/kubectl_annotate/ - title: kubectl api-versions diff --git a/update-imported-docs.sh b/update-imported-docs.sh index 2b9203e168..5c2674cf6c 100755 --- a/update-imported-docs.sh +++ b/update-imported-docs.sh @@ -102,6 +102,13 @@ cd docs/user-guide/kubectl find . -name '*.md' -type f -exec sed -i -e '//,//d' {} \; find . -name '*.md' -type f -exec sed -i -e '//,//d' {} \; + # Rename kubectl.md to index.md + mv kubectl.md index.md + # Strip the "See Also" links. + # These links in raw .md files are relative to current file location, but the website see them as relative to current url instead, and will return 404. + find . -name 'kubectl*.md' -type f -exec sed -i -e '/### SEE ALSO/d' {} \; + find . -name 'kubectl*.md' -type f -exec sed -i -e '/\* \[kubectl/d' {} \; + # Add the expected headers to md files find . -name '*.md' -type f -exec sed -i -e '1 i\ ---' {} \;