Add titles to docs
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
assignees:
|
assignees:
|
||||||
- eparis
|
- eparis
|
||||||
- mikedanese
|
- mikedanese
|
||||||
|
title: Kubernetes 101
|
||||||
---
|
---
|
||||||
|
|
||||||
## Kubectl CLI and Pods
|
## Kubectl CLI and Pods
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
assignees:
|
assignees:
|
||||||
- janetkuo
|
- janetkuo
|
||||||
- mikedanese
|
- mikedanese
|
||||||
|
title: Kubernetes 201
|
||||||
---
|
---
|
||||||
|
|
||||||
## Labels, Deployments, Services and Health Checking
|
## Labels, Deployments, Services and Health Checking
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ no_title_counter=0
|
|||||||
# (docs/api-reference/1_5, docs/user-guide/kubectl/1_5, and
|
# (docs/api-reference/1_5, docs/user-guide/kubectl/1_5, and
|
||||||
# docs/resources-reference/1_5)
|
# 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
|
||||||
|
# Skip checking all files in the following folders
|
||||||
if [[ "${file}" == "docs/api-reference/1_"* ]] ||
|
if [[ "${file}" == "docs/api-reference/1_"* ]] ||
|
||||||
[[ "${file}" == "docs/user-guide/kubectl/1_"* ]] ||
|
[[ "${file}" == "docs/user-guide/kubectl/1_"* ]] ||
|
||||||
[[ "${file}" == "docs/resources-reference/1_"* ]]; then
|
[[ "${file}" == "docs/resources-reference/1_"* ]]; then
|
||||||
# Skip checking files in the above folders
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -38,6 +38,10 @@ for file in `find docs -name "*.md" -type f`; do
|
|||||||
# non-space/tab content. They should also be inside the markdown header.
|
# 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 [[ "${file}" == "docs/user-guide/kubectl/kubectl"* ]]; then
|
||||||
|
# Skip checking auto-generated kubectl docs since its first heading matches title
|
||||||
|
continue
|
||||||
|
fi
|
||||||
if ! grep -q "${file}" skip_title_check.txt; then
|
if ! grep -q "${file}" skip_title_check.txt; then
|
||||||
if ! grep -q "^title:\s*[^\s]" ${file}; then
|
if ! grep -q "^title:\s*[^\s]" ${file}; then
|
||||||
echo "Error: ${file} doesn't have a proper title defined!"
|
echo "Error: ${file} doesn't have a proper title defined!"
|
||||||
|
|||||||
Reference in New Issue
Block a user