From 089ce4c6097986d18dec31707d3eca7d642368df Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Tue, 10 Jan 2017 15:23:03 -0800 Subject: [PATCH] Add titles to docs --- docs/user-guide/walkthrough/index.md | 2 +- docs/user-guide/walkthrough/k8s201.md | 2 +- verify-docs-format.sh | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/walkthrough/index.md b/docs/user-guide/walkthrough/index.md index 4c095e1c050..d7872b22604 100644 --- a/docs/user-guide/walkthrough/index.md +++ b/docs/user-guide/walkthrough/index.md @@ -2,7 +2,7 @@ assignees: - eparis - mikedanese - +title: Kubernetes 101 --- ## Kubectl CLI and Pods diff --git a/docs/user-guide/walkthrough/k8s201.md b/docs/user-guide/walkthrough/k8s201.md index 782bfbe4189..c96d9727e1b 100644 --- a/docs/user-guide/walkthrough/k8s201.md +++ b/docs/user-guide/walkthrough/k8s201.md @@ -2,7 +2,7 @@ assignees: - janetkuo - mikedanese - +title: Kubernetes 201 --- ## Labels, Deployments, Services and Health Checking diff --git a/verify-docs-format.sh b/verify-docs-format.sh index ef840ef3be0..ceed5a47f98 100755 --- a/verify-docs-format.sh +++ b/verify-docs-format.sh @@ -10,10 +10,10 @@ no_title_counter=0 # (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 + # Skip checking all files in the following folders 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 @@ -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. # For example, "title:", " title: abc", and "title:" aren't 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 "^title:\s*[^\s]" ${file}; then echo "Error: ${file} doesn't have a proper title defined!"