Skip some folders

1. Update the script to skip checking a whole folder
2. Skip checking auto-generated kubectl docs since they already work without title
3. Remove some skipped files in skip_toc_check.txt since we can now skip a folder
This commit is contained in:
Janet Kuo
2017-01-10 15:08:05 -08:00
parent 9c127908c3
commit 9554380515
3 changed files with 14 additions and 1573 deletions
+2
View File
@@ -7,3 +7,5 @@ docs/api-reference/extensions/v1beta1/definitions.md
docs/api-reference/extensions/v1beta1/operations.md
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
-1571
View File
File diff suppressed because it is too large Load Diff
+12 -2
View File
@@ -6,7 +6,17 @@ no_title=false
no_title_counter=0
# Verify all docs/.../*.md files
# Skip checking autogenerated files in some folders
# (docs/api-reference/1_5, docs/user-guide/kubectl/1_5, and
# docs/resources-reference/1_5)
for file in `find docs -name "*.md" -type f`; do
if [[ "${file}" == "docs/api-reference/1_"* ]] ||
[[ "${file}" == "docs/user-guide/kubectl/1_"* ]] ||
[[ "${file}" == "docs/resources-reference/1_"* ]]; then
# Skip checking files in the above folders
continue
fi
# 1. TOC check:
# Check they are referenced in at least one of _data/*.yml files.
# Skip checking files in skip_toc_check.txt
@@ -23,9 +33,9 @@ for file in `find docs -name "*.md" -type f`; do
# 2. Title check:
# Check they have a proper title.
# Skip checking files in skip_title_check.txt
# Skip checking files in skip_title_check.txt.
# Title should start with "title:" and can have several spaces/tabs between
# non-space/tab content.
# non-space/tab content. They should also be inside the markdown header.
# For example, "title:", " title: abc", and "title:" aren't valid,
# but "title: abc", "title:def" and "title: def ghi" are both valid.
if ! grep -q "${file}" skip_title_check.txt; then