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:
@@ -7,3 +7,5 @@ docs/api-reference/extensions/v1beta1/definitions.md
|
|||||||
docs/api-reference/extensions/v1beta1/operations.md
|
docs/api-reference/extensions/v1beta1/operations.md
|
||||||
docs/api-reference/v1/definitions.md
|
docs/api-reference/v1/definitions.md
|
||||||
docs/api-reference/v1/operations.md
|
docs/api-reference/v1/operations.md
|
||||||
|
docs/user-guide/pods/_viewing-a-pod.md
|
||||||
|
docs/user-guide/simple-yaml.md
|
||||||
|
|||||||
-1571
File diff suppressed because it is too large
Load Diff
+12
-2
@@ -6,7 +6,17 @@ no_title=false
|
|||||||
no_title_counter=0
|
no_title_counter=0
|
||||||
|
|
||||||
# Verify all docs/.../*.md files
|
# 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
|
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:
|
# 1. TOC check:
|
||||||
# Check they are referenced in at least one of _data/*.yml files.
|
# Check they are referenced in at least one of _data/*.yml files.
|
||||||
# Skip checking files in skip_toc_check.txt
|
# 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:
|
# 2. Title check:
|
||||||
# Check they have a proper title.
|
# 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
|
# 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,
|
# For example, "title:", " title: abc", and "title:" aren't valid,
|
||||||
# but "title: abc", "title:def" and "title: def ghi" are both valid.
|
# but "title: abc", "title:def" and "title: def ghi" are both valid.
|
||||||
if ! grep -q "${file}" skip_title_check.txt; then
|
if ! grep -q "${file}" skip_title_check.txt; then
|
||||||
|
|||||||
Reference in New Issue
Block a user