mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
gen_docs_sidebar: redirect output to sidebar.md as part of the script
The script should be self-sufficient (with no need to manually specify a redirection). This makes it easier to run it as part of pre-commit and CI.
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
# The script will ignore any files that are not markdown files.
|
# The script will ignore any files that are not markdown files.
|
||||||
# Usage: bash scripts/gen_docs_sidebar.sh > docs/_sidebar.md
|
# Usage: bash scripts/gen_docs_sidebar.sh > docs/_sidebar.md
|
||||||
|
|
||||||
|
{
|
||||||
echo "* [Readme](/)"
|
echo "* [Readme](/)"
|
||||||
|
|
||||||
for folder in $(find docs/*/ | sort -f); do
|
for folder in $(find docs/*/ | sort -f); do
|
||||||
@@ -29,3 +30,4 @@ for folder in $(find docs/*/ | sort -f); do
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
} > docs/_sidebar.md
|
||||||
|
|||||||
Reference in New Issue
Block a user