diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-02-06 16:00:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-06 16:00:41 +0100 |
commit | d054de0771b23f345ef80b33e29d1ede3d8f312c (patch) | |
tree | 2bdc3b8283731008a509b78300b3f899dab9ee8a | |
parent | 59419c71f7064b0270ea249280122f97d47fe33d (diff) |
Add go.d documentation and modify collector menu (#5215)
docs/generator/buildyaml.sh
* Modified menu structure of collectors
* Added go.d plugin
docs/generator/buildhtml.sh
* Added go.d documentation (git clone). Clean up the go.d cloned dir before and after execution
* Replace page edit links to github for go.d.plugin. Removed nomkdocs option which doesn't work with this.
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | docs/generator/buildhtml.sh | 20 | ||||
-rwxr-xr-x | docs/generator/buildyaml.sh | 63 |
3 files changed, 55 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore index 51b436152f..7412721846 100644 --- a/.gitignore +++ b/.gitignore @@ -106,6 +106,7 @@ collectors/charts.d.plugin/charts.d.plugin collectors/node.d.plugin/node.d.plugin collectors/python.d.plugin/python.d.plugin collectors/fping.plugin/fping.plugin +collectors/go.d.plugin # installer generated files netdata-uninstaller.sh diff --git a/docs/generator/buildhtml.sh b/docs/generator/buildhtml.sh index 3cc87d29f8..3f73420815 100755 --- a/docs/generator/buildhtml.sh +++ b/docs/generator/buildhtml.sh @@ -14,6 +14,10 @@ if [ "$currentdir" = "generator" ]; then fi GENERATOR_DIR="docs/generator" +# Fetch go.d.plugin docs +rm -rf ./collectors/go.d.plugin +git clone https://github.com/netdata/go.d.plugin.git ./collectors/go.d.plugin + # Copy all netdata .md files to docs/generator/src. Exclude htmldoc itself and also the directory node_modules generatord by Netlify echo "Copying files" rm -rf ${GENERATOR_DIR}/src @@ -22,6 +26,8 @@ find . -type d \( -path ./${GENERATOR_DIR} -o -path ./node_modules \) -prune -o # Copy netdata html resources cp -a ./${GENERATOR_DIR}/custom ./${GENERATOR_DIR}/src/ + + # Modify the first line of the main README.md, to enable proper static html generation echo "Modifying README header" sed -i -e '0,/# netdata /s//# Introduction\n\n/' ${GENERATOR_DIR}/src/README.md @@ -50,11 +56,15 @@ echo "Fixing links" # Fix links (recursively, all types, executing replacements) ${GENERATOR_DIR}/checklinks.sh -rax -if [ "${1}" != "nomkdocs" ] ; then - echo "Calling mkdocs" +echo "Calling mkdocs" - # Build html docs - mkdocs build --config-file=${GENERATOR_DIR}/mkdocs.yml -fi +# Build html docs +mkdocs build --config-file=${GENERATOR_DIR}/mkdocs.yml + +# Fix edit buttons for the markdowns that are not on the main netdata repo +find ${GENERATOR_DIR}/build/collectors/go.d.plugin -name "*.html" -print0 | xargs -0 sed -i -e 's/https:\/\/github.com\/netdata\/netdata\/blob\/master\/collectors\/go.d.plugin/https:\/\/github.com\/netdata\/go.d.plugin\/blob\/master/g' + +# Remove the cloned go.d.plugin project +rm -rf ./collectors/go.d.plugin echo "Finished" diff --git a/docs/generator/buildyaml.sh b/docs/generator/buildyaml.sh index a86b1392e5..bb5ecc6ed9 100755 --- a/docs/generator/buildyaml.sh +++ b/docs/generator/buildyaml.sh @@ -174,31 +174,46 @@ navpart 3 collectors/freebsd.plugin navpart 3 collectors/macos.plugin navpart 2 collectors/plugins.d "" "External plugins" -navpart 3 collectors/python.d.plugin "" "Python modules" 3 -navpart 3 collectors/node.d.plugin "" "Node.js modules" 3 -echo -ne " - BASH modules: + +echo -ne " - Go: + - 'collectors/go.d.plugin/README.md' +" +navpart 4 collectors/go.d.plugin "" "Modules" 3 excludefirstlevel + +echo -ne " - Python: + - 'collectors/python.d.plugin/README.md' +" +navpart 4 collectors/python.d.plugin "" "Modules" 3 excludefirstlevel + +echo -ne " - Node.js: + - 'collectors/node.d.plugin/README.md' +" +navpart 4 collectors/node.d.plugin "" "Modules" 3 excludefirstlevel + +echo -ne " - BASH: - 'collectors/charts.d.plugin/README.md' - - 'collectors/charts.d.plugin/ap/README.md' - - 'collectors/charts.d.plugin/apcupsd/README.md' - - 'collectors/charts.d.plugin/example/README.md' - - 'collectors/charts.d.plugin/libreswan/README.md' - - 'collectors/charts.d.plugin/nut/README.md' - - 'collectors/charts.d.plugin/opensips/README.md' - - Obsolete BASH modules: - - 'collectors/charts.d.plugin/mem_apps/README.md' - - 'collectors/charts.d.plugin/postfix/README.md' - - 'collectors/charts.d.plugin/tomcat/README.md' - - 'collectors/charts.d.plugin/sensors/README.md' - - 'collectors/charts.d.plugin/cpu_apps/README.md' - - 'collectors/charts.d.plugin/squid/README.md' - - 'collectors/charts.d.plugin/nginx/README.md' - - 'collectors/charts.d.plugin/hddtemp/README.md' - - 'collectors/charts.d.plugin/cpufreq/README.md' - - 'collectors/charts.d.plugin/mysql/README.md' - - 'collectors/charts.d.plugin/exim/README.md' - - 'collectors/charts.d.plugin/apache/README.md' - - 'collectors/charts.d.plugin/load_average/README.md' - - 'collectors/charts.d.plugin/phpfpm/README.md' + - Modules: + - 'collectors/charts.d.plugin/ap/README.md' + - 'collectors/charts.d.plugin/apcupsd/README.md' + - 'collectors/charts.d.plugin/example/README.md' + - 'collectors/charts.d.plugin/libreswan/README.md' + - 'collectors/charts.d.plugin/nut/README.md' + - 'collectors/charts.d.plugin/opensips/README.md' + - Obsolete Modules: + - 'collectors/charts.d.plugin/mem_apps/README.md' + - 'collectors/charts.d.plugin/postfix/README.md' + - 'collectors/charts.d.plugin/tomcat/README.md' + - 'collectors/charts.d.plugin/sensors/README.md' + - 'collectors/charts.d.plugin/cpu_apps/README.md' + - 'collectors/charts.d.plugin/squid/README.md' + - 'collectors/charts.d.plugin/nginx/README.md' + - 'collectors/charts.d.plugin/hddtemp/README.md' + - 'collectors/charts.d.plugin/cpufreq/README.md' + - 'collectors/charts.d.plugin/mysql/README.md' + - 'collectors/charts.d.plugin/exim/README.md' + - 'collectors/charts.d.plugin/apache/README.md' + - 'collectors/charts.d.plugin/load_average/README.md' + - 'collectors/charts.d.plugin/phpfpm/README.md' " navpart 3 collectors/fping.plugin |