summaryrefslogtreecommitdiffstats
path: root/docs/generator
diff options
context:
space:
mode:
Diffstat (limited to 'docs/generator')
-rwxr-xr-xdocs/generator/buildhtml.sh60
-rwxr-xr-xdocs/generator/buildyaml.sh200
-rwxr-xr-xdocs/generator/checklinks.sh394
-rw-r--r--docs/generator/requirements.txt3
-rw-r--r--docs/generator/runtime.txt1
-rw-r--r--docs/generator/themes/material/partials/footer.html57
6 files changed, 715 insertions, 0 deletions
diff --git a/docs/generator/buildhtml.sh b/docs/generator/buildhtml.sh
new file mode 100755
index 0000000000..82196d66f0
--- /dev/null
+++ b/docs/generator/buildhtml.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+# buildhtml.sh
+
+# Builds the html static site, using mkdocs
+# Assumes that the script is executed either from the htmldoc folder (by netlify), or from the root repo dir (as originally intended)
+currentdir=$(pwd | awk -F '/' '{print $NF}')
+echo "$currentdir"
+if [ "$currentdir" = "generator" ]; then
+ cd ../..
+fi
+GENERATOR_DIR="docs/generator"
+
+# 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
+find . -type d \( -path ./${GENERATOR_DIR} -o -path ./node_modules \) -prune -o -name "*.md" -print | cpio -pd ${GENERATOR_DIR}/src
+
+# Modify the first line of the main README.md, to enable proper static html generation
+sed -i '0,/# netdata /s//# Introduction\n\n/' ${GENERATOR_DIR}/src/README.md
+
+# Remove specific files that don't belong in the documentation
+declare -a EXCLUDE_LIST=(
+ "HISTORICAL_CHANGELOG.md"
+ "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"
+)
+for f in "${EXCLUDE_LIST[@]}"; do
+ rm "${GENERATOR_DIR}/src/$f"
+done
+
+echo "Creating mkdocs.yaml"
+
+# Generate mkdocs.yaml
+${GENERATOR_DIR}/buildyaml.sh >${GENERATOR_DIR}/mkdocs.yml
+
+echo "Fixing links"
+
+# Fix links (recursively, all types, executing replacements)
+${GENERATOR_DIR}/checklinks.sh -rax
+if [ $? -eq 1 ]; then exit 1; fi
+
+echo "Calling mkdocs"
+
+# Build html docs
+mkdocs build --config-file=${GENERATOR_DIR}/mkdocs.yml
+
+echo "Finished"
diff --git a/docs/generator/buildyaml.sh b/docs/generator/buildyaml.sh
new file mode 100755
index 0000000000..14e019fabb
--- /dev/null
+++ b/docs/generator/buildyaml.sh
@@ -0,0 +1,200 @@
+#!/bin/bash
+
+GENERATOR_DIR="docs/generator"
+cd ${GENERATOR_DIR}/src
+
+# create yaml nav subtree with all the files directly under a specific directory
+# arguments:
+# tabs - how deep do we show it in the hierarchy. Level 1 is the top level, max should probably be 3
+# directory - to get mds from to add them to the yaml
+# file - can be left empty to include all files
+# name - what do we call the relevant section on the navbar. Empty if no new section is required
+# maxdepth - how many levels of subdirectories do I include in the yaml in this section. 1 means just the top level and is the default if left empty
+# excludefirstlevel - Optional param. If passed, mindepth is set to 2, to exclude the READMEs in the first directory level
+
+navpart() {
+ tabs=$1
+ dir=$2
+ file=$3
+ section=$4
+ maxdepth=$5
+ excludefirstlevel=$6
+ spc=""
+
+ i=1
+ while [ ${i} -lt ${tabs} ]; do
+ spc=" $spc"
+ i=$((i + 1))
+ done
+
+ if [ -z "$file" ]; then file='*'; fi
+ if [[ -n $section ]]; then echo "$spc- ${section}:"; fi
+ if [ -z "$maxdepth" ]; then maxdepth=1; fi
+ if [[ -n $excludefirstlevel ]]; then mindepth=2; else mindepth=1; fi
+
+ for f in $(find $dir -mindepth $mindepth -maxdepth $maxdepth -name "${file}.md" -printf '%h\0%d\0%p\n' | sort -t '\0' -n | awk -F '\0' '{print $3}'); do
+ # If I'm adding a section, I need the child links to be one level deeper than the requested level in "tabs"
+ if [ -z "$section" ]; then
+ echo "$spc- '$f'"
+ else
+ echo "$spc - '$f'"
+ fi
+ done
+}
+
+echo -e 'site_name: NetData Documentation
+repo_url: https://github.com/netdata/netdata
+repo_name: GitHub
+edit_uri: blob/master
+site_description: NetData Documentation
+copyright: NetData, 2018
+docs_dir: src
+site_dir: build
+#use_directory_urls: false
+strict: true
+theme:
+ name: "material"
+ custom_dir: themes/material
+markdown_extensions:
+ - extra
+ - abbr
+ - attr_list
+ - def_list
+ - fenced_code
+ - footnotes
+ - tables
+ - admonition
+ - codehilite
+ - meta
+ - nl2br
+ - sane_lists
+ - smarty
+ - toc:
+ permalink: True
+ separator: "-"
+ - wikilinks
+ - pymdownx.arithmatex
+ - pymdownx.betterem:
+ smart_enable: all
+ - pymdownx.caret
+ - pymdownx.critic
+ - pymdownx.details
+ - pymdownx.emoji:
+ emoji_generator: !!python/name:pymdownx.emoji.to_svg
+ - pymdownx.inlinehilite
+ - pymdownx.magiclink
+ - pymdownx.mark
+ - pymdownx.smartsymbols
+ - pymdownx.superfences
+ - pymdownx.tasklist:
+ custom_checkbox: true
+ - pymdownx.tilde
+ - pymdownx.betterem
+ - pymdownx.superfences
+ - markdown.extensions.footnotes
+ - markdown.extensions.attr_list
+ - markdown.extensions.def_list
+ - markdown.extensions.tables
+ - markdown.extensions.abbr
+ - pymdownx.extrarawhtml
+nav:'
+
+navpart 1 . README "About"
+
+echo -ne " - 'docs/Why-Netdata.md'
+ - 'docs/Demo-Sites.md'
+ - 'docs/netdata-security.md'
+ - 'docs/Donations-netdata-has-received.md'
+ - 'docs/a-github-star-is-important.md'
+ - REDISTRIBUTED.md
+ - CHANGELOG.md
+"
+
+echo -ne "- Installation:
+ - 'installer/README.md'
+ - 'docker/README.md'
+ - 'installer/UPDATE.md'
+ - 'installer/UNINSTALL.md'
+"
+
+echo -ne "- 'docs/GettingStarted.md'
+"
+
+echo -ne "- Running netdata:
+"
+navpart 2 daemon
+navpart 2 daemon/config
+
+navpart 2 web/server "" "Web server"
+navpart 3 web/server "" "" 2 excludefirstlevel
+echo -ne " - Running behind another web server:
+ - 'docs/Running-behind-nginx.md'
+ - 'docs/Running-behind-apache.md'
+ - 'docs/Running-behind-lighttpd.md'
+ - 'docs/Running-behind-caddy.md'
+"
+#navpart 2 system
+navpart 2 database
+navpart 2 registry
+
+echo -ne " - 'docs/Performance.md'
+ - 'docs/netdata-for-IoT.md'
+ - 'docs/high-performance-netdata.md'
+"
+
+navpart 1 collectors "" "Data collection" 1
+echo -ne " - 'docs/Add-more-charts-to-netdata.md'
+ - Internal plugins:
+"
+navpart 3 collectors/proc.plugin
+navpart 3 collectors/statsd.plugin
+navpart 3 collectors/cgroups.plugin
+navpart 3 collectors/idlejitter.plugin
+navpart 3 collectors/tc.plugin
+navpart 3 collectors/nfacct.plugin
+navpart 3 collectors/checks.plugin
+navpart 3 collectors/diskspace.plugin
+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
+navpart 3 collectors/charts.d.plugin "" "BASH modules" 3
+navpart 3 collectors/apps.plugin
+navpart 3 collectors/fping.plugin
+navpart 3 collectors/freeipmi.plugin
+
+echo -ne " - 'docs/Third-Party-Plugins.md'
+"
+
+navpart 1 health README "Alarms and notifications"
+navpart 2 health/notifications "" "" 1
+navpart 2 health/notifications "" "Supported notifications" 2 excludefirstlevel
+
+navpart 1 streaming "" "" 4
+
+navpart 1 backends "" "Archiving to backends" 3
+
+navpart 1 web "README" "Dashboards"
+navpart 2 web/gui "" "" 3
+
+navpart 1 web/api "" "HTTP API"
+navpart 2 web/api/exporters "" "Exporters" 2
+navpart 2 web/api/formatters "" "Formatters" 2
+navpart 2 web/api/badges "" "" 2
+navpart 2 web/api/health "" "" 2
+navpart 2 web/api/queries "" "Queries" 2
+
+echo -ne "- Hacking netdata:
+ - CONTRIBUTING.md
+ - CODE_OF_CONDUCT.md
+ - 'docs/Netdata-Security-and-Disclosure-Information.md'
+ - CONTRIBUTORS.md
+"
+navpart 2 makeself "" "" 4
+navpart 2 packaging "" "" 4
+navpart 2 libnetdata "" "libnetdata" 4
+navpart 2 contrib
+navpart 2 tests
+navpart 2 diagrams/data_structures
diff --git a/docs/generator/checklinks.sh b/docs/generator/checklinks.sh
new file mode 100755
index 0000000000..628c6aee5c
--- /dev/null
+++ b/docs/generator/checklinks.sh
@@ -0,0 +1,394 @@
+#!/bin/bash
+# shellcheck disable=SC2181
+
+# Doc link checker
+# Validates and tries to fix all links that will cause issues either in the repo, or in the html site
+
+GENERATOR_DIR="docs/generator"
+
+dbg () {
+ if [ "$VERBOSE" -eq 1 ] ; then printf "%s\\n" "${1}" ; fi
+}
+
+printhelp () {
+ echo "Usage: docs/generator/checklinks.sh [-r OR -f <fname>] [OPTIONS]
+ -r Recursively check all mds in all child directories, except docs/generator and node_modules (which is generatord by netlify)
+ -f Just check the passed md file
+ General Options:
+ -x Execute commands. By default the script runs in test mode with no files changed by the script (results and fixes are just shown). Use -x to have it apply the changes.
+ -u trys to follow URLs using curl
+ -v Outputs debugging messages
+ By default, nothing is actually checked. The following options tell it what to check:
+ -a Check all link types
+ -w Check wiki links (and just warn if you see one)
+ -b Check absolute links to the netdata repo (and change them to relative). Only checks links to https://github.com/netdata/netdata/????/master*
+ -l Check relative links to the netdata repo (and replace them with links that the html static site can live with, under docs/generator/src only)
+ -e Check external links, outside the wiki or the repo (useless without adding the -u option, to verify that they're not broken)
+ "
+}
+
+fix () {
+ if [ "$EXECUTE" -eq 0 ] ; then
+ echo "-- SHOULD EXECUTE: $1"
+ else
+ dbg "-- EXECUTING: $1"
+ eval "$1"
+ fi
+}
+
+ck_netdata_absolute () {
+ f=$1
+ alnk=$2
+ lnkinfile=$3
+ testURL "$alnk"
+
+ if [[ $f =~ ^(.*)/([^/]*)$ ]] ; then
+ fpath="${BASH_REMATCH[1]}"
+ dbg "-- Current file is at $fpath"
+ fi
+
+ if [ $? -eq 0 ] ; then
+ rlnk=$(echo "$alnk" | sed 's/https:\/\/github.com\/netdata\/netdata\/....\/master\///g')
+ case $rlnk in
+ \#* ) dbg "-- (#somelink)" ;;
+ */ ) dbg "-- # (path/)" ;;
+ */#* ) dbg "-- # (path/#somelink)" ;;
+ */*.md ) dbg "-- # (path/filename.md)" ;;
+ */*.md#* ) dbg "-- # (path/filename.md#somelink)" ;;
+ *#* )
+ dbg "-- # (path#somelink) -> (path/#somelink)"
+ if [[ $rlnk =~ ^(.*)#(.*)$ ]] ; then
+ dbg "-- $rlnk -> ${BASH_REMATCH[1]}/#${BASH_REMATCH[2]}"
+ rlnk="${BASH_REMATCH[1]}/#${BASH_REMATCH[2]}"
+ fi
+ ;;
+ * )
+ if [ -f "$rlnk" ] ; then
+ dbg "-- # (path/someotherfile) $rlnk"
+ else
+ if [ -d "$rlnk" ] ; then
+ dbg "-- # (path) -> (path/)"
+ rlnk="$rlnk/"
+ else
+ echo "-- ERROR: $f - $alnk is neither a file nor a directory. Giving up!"
+ EXITCODE=1
+ return
+ fi
+ fi
+ ;;
+ esac
+
+ if [[ $rlnk =~ ^(.*)/([^/]*)$ ]] ; then
+ abspath="${BASH_REMATCH[1]}"
+ rest="${BASH_REMATCH[2]}"
+ dbg "-- Target file is at $abspath"
+ fi
+ relativelink=$(realpath --relative-to="$fpath" "$abspath")
+ if [ $? -eq 0 ] ; then
+ srch=$(echo "$lnkinfile" | sed 's/\//\\\//g')
+ if [ "$relativelink" = "." ] ; then
+ rplc=$(echo "$rest" | sed 's/\//\\\//g')
+ else
+ rplc=$(echo "$relativelink/$rest" | sed 's/\//\\\//g')
+ fi
+ fix "sed -i 's/($srch)/($rplc)/g' $f"
+ else
+ echo "-- ERROR: $f - Can't determine relative path of $alnk"
+ fi
+ else
+ echo "-- ERROR: $f - $alnk is a broken link"
+ EXITCODE=1
+ return
+ fi
+}
+
+testURL () {
+ if [ "$TESTURLS" -eq 0 ] ; then return 0 ; fi
+ dbg "-- Testing URL $1"
+ curl -sS "$1" > /dev/null
+ if [ $? -gt 0 ] ; then
+ return 1
+ fi
+ return 0
+}
+
+testinternal () {
+ # Check if the header referred to by the internal link exists in the same file
+ ff=${1}
+ ifile=${2}
+ ilnk=${3}
+ header=${ilnk//-/}
+ dbg "-- Searching for \"$header\" in $ifile"
+ tr -d ',_.:? `'< "$ifile" | sed 's/-//g' | grep -i "^\\#*$header\$" >/dev/null
+ if [ $? -eq 0 ] ; then
+ dbg "-- $ilnk found in $ifile"
+ return 0
+ else
+ echo "-- ERROR: $ff - $ilnk header not found in file $ifile"
+ EXITCODE=1
+ return 1
+ fi
+}
+
+testf () {
+ sf=$1
+ tf=$2
+
+ if [ -f "$tf" ] ; then
+ dbg "-- $tf exists"
+ return 0
+ else
+ echo "-- ERROR: $sf - $tf does not exist"
+ EXITCODE=1
+ return 1
+ fi
+}
+
+ck_netdata_relative () {
+ f=${1}
+ rlnk=${2}
+ dbg "-- Checking relative link $rlnk"
+ fpath="."
+ fname="$f"
+ # First ensure that the link works in the repo, then try to fix it in htmldocs
+ if [[ $f =~ ^(.*)/([^/]*)$ ]] ; then
+ fpath="${BASH_REMATCH[1]}"
+ fname="${BASH_REMATCH[2]}"
+ dbg "-- Current file is at $fpath"
+ else
+ dbg "-- Current file is at root directory"
+ fi
+ # Cases to handle:
+ # (#somelink)
+ # (path/)
+ # (path/#somelink)
+ # (path/filename.md) -> htmldoc (path/filename/)
+ # (path/filename.md#somelink) -> htmldoc (path/filename/#somelink)
+ # (path#somelink) -> htmldoc (path/#somelink)
+ # (path/someotherfile) -> htmldoc (absolutelink)
+ # (path) -> htmldoc (path/)
+
+ TRGT=""
+ s=""
+
+ case "$rlnk" in
+ \#* )
+ dbg "-- # (#somelink)"
+ testinternal "$f" "$f" "$rlnk"
+ ;;
+ */ )
+ dbg "-- # (path/)"
+ TRGT="$fpath/${rlnk}README.md"
+ testf "$f" "$TRGT"
+ if [ $? -eq 0 ] ; then
+ if [ "$fname" != "README.md" ] ; then s="../$rlnk"; fi
+ fi
+ ;;
+ */\#* )
+ dbg "-- # (path/#somelink)"
+ if [[ $rlnk =~ ^(.*)/#(.*)$ ]] ; then
+ TRGT="$fpath/${BASH_REMATCH[1]}/README.md"
+ LNK="#${BASH_REMATCH[2]}"
+ dbg "-- Look for $LNK in $TRGT"
+ testf "$f" "$TRGT"
+ if [ $? -eq 0 ] ; then
+ testinternal "$f" "$TRGT" "$LNK"
+ if [ $? -eq 0 ] ; then
+ if [ "$fname" != "README.md" ] ; then s="../$rlnk"; fi
+ fi
+ fi
+ fi
+ ;;
+ *.md )
+ dbg "-- # (path/filename.md) -> htmldoc (path/filename/)"
+ testf "$f" "$fpath/$rlnk"
+ if [ $? -eq 0 ] ; then
+ if [[ $rlnk =~ ^(.*)/(.*).md$ ]] ; then
+ if [ "${BASH_REMATCH[2]}" = "README" ] ; then
+ s="../${BASH_REMATCH[1]}/"
+ else
+ s="../${BASH_REMATCH[1]}/${BASH_REMATCH[2]}/"
+ fi
+ if [ "$fname" != "README.md" ] ; then s="../$s"; fi
+ fi
+ fi
+ ;;
+ *.md\#* )
+ dbg "-- # (path/filename.md#somelink) -> htmldoc (path/filename/#somelink)"
+ if [[ $rlnk =~ ^(.*)#(.*)$ ]] ; then
+ TRGT="$fpath/${BASH_REMATCH[1]}"
+ LNK="#${BASH_REMATCH[2]}"
+ testf "$f" "$TRGT"
+ if [ $? -eq 0 ] ; then
+ testinternal "$f" "$TRGT" "$LNK"
+ if [ $? -eq 0 ] ; then
+ if [[ $lnk =~ ^(.*)/(.*).md#(.*)$ ]] ; then
+ if [ "${BASH_REMATCH[2]}" = "README" ] ; then
+ s="../${BASH_REMATCH[1]}/#${BASH_REMATCH[3]}"
+ else
+ s="../${BASH_REMATCH[1]}/${BASH_REMATCH[2]}/#${BASH_REMATCH[3]}"
+ fi
+ if [ "$fname" != "README.md" ] ; then s="../$s"; fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ *\#* )
+ dbg "-- # (path#somelink) -> (path/#somelink)"
+ if [[ $rlnk =~ ^(.*)#(.*)$ ]] ; then
+ TRGT="$fpath/${BASH_REMATCH[1]}/README.md"
+ LNK="#${BASH_REMATCH[2]}"
+ testf "$f" "$TRGT"
+ if [ $? -eq 0 ] ; then
+ testinternal "$f" "$TRGT" "$LNK"
+ if [ $? -eq 0 ] ; then
+ if [[ $rlnk =~ ^(.*)#(.*)$ ]] ; then
+ s="${BASH_REMATCH[1]}/#${BASH_REMATCH[2]}"
+ if [ "$fname" != "README.md" ] ; then s="../$s"; fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ * )
+ if [ -f "$fpath/$rlnk" ] ; then
+ dbg "-- # (path/someotherfile) $rlnk"
+ if [ "$fpath" = "." ] ; then
+ s="https://github.com/netdata/netdata/tree/master/$rlnk"
+ else
+ s="https://github.com/netdata/netdata/tree/master/$fpath/$rlnk"
+ fi
+ else
+ if [ -d "$fpath/$rlnk" ] ; then
+ dbg "-- # (path) -> htmldoc (path/)"
+ testf "$f" "$fpath/$rlnk/README.md"
+ if [ $? -eq 0 ] ; then
+ s="$rlnk/"
+ if [ "$fname" != "README.md" ] ; then s="../$s"; fi
+ fi
+ else
+ echo "-- ERROR: $f - $rlnk is neither a file or a directory. Giving up!"
+ EXITCODE=1
+ fi
+ fi
+ ;;
+ esac
+
+ if [[ ! -z $s ]] ; then
+ srch=$(echo "$rlnk" | sed 's/\//\\\//g')
+ rplc=$(echo "$s" | sed 's/\//\\\//g')
+ fix "sed -i 's/($srch)/($rplc)/g' $GENERATOR_DIR/src/$f"
+ fi
+}
+
+
+checklinks () {
+ f=$1
+ dbg "Checking $f"
+ while read -r l ; do
+ for word in $l ; do
+ if [[ $word =~ .*\]\(([^\(\) ]*)\).* ]] ; then
+ lnk="${BASH_REMATCH[1]}"
+ if [ -z "$lnk" ] ; then continue ; fi
+ dbg "-$lnk"
+ case "$lnk" in
+ mailto:* ) dbg "-- Mailto link, ignoring" ;;
+ https://github.com/netdata/netdata/wiki* )
+ dbg "-- Wiki Link $lnk"
+ if [ "$CHKWIKI" -eq 1 ] ; then echo "-- WARNING: $f - $lnk points to the wiki. Please replace it manually" ; fi
+ ;;
+ https://github.com/netdata/netdata/????/master* )
+ dbg "-- Absolute link $lnk"
+ if [ "$CHKABSOLUTE" -eq 1 ] ; then ck_netdata_absolute "$f" "$lnk" "$lnk" ; fi
+ ;;
+ http* )
+ dbg "-- External link $lnk"
+ if [ "$CHKEXTERNAL" -eq 1 ] ; then
+ testURL "$lnk"
+ if [ $? -eq 1 ] ; then
+ echo "-- ERROR: $f - $lnk is a broken link"
+ EXITCODE=1
+ fi
+ fi
+ ;;
+ * )
+ dbg "-- Relative link $lnk"
+ if [ "$CHKRELATIVE" -eq 1 ] ; then ck_netdata_relative "$f" "$lnk" ; fi
+ ;;
+ esac
+ fi
+ done
+ done < "$f"
+}
+
+TESTURLS=0
+VERBOSE=0
+RECURSIVE=0
+EXECUTE=0
+CHKWIKI=0
+CHKABSOLUTE=0
+CHKEXTERNAL=0
+CHKRELATIVE=0
+while getopts :f:rxuvwbela option
+do
+ case "$option" in
+ f)
+ file=$OPTARG
+ ;;
+ r)
+ RECURSIVE=1
+ ;;
+ x)
+ EXECUTE=1
+ ;;
+ u)
+ TESTURLS=1
+ ;;
+ v)
+ VERBOSE=1
+ ;;
+ w)
+ CHKWIKI=1
+ ;;
+ b)
+ CHKABSOLUTE=1
+ ;;
+ e)
+ CHKEXTERNAL=1
+ ;;
+ l)
+ CHKRELATIVE=1
+ ;;
+ a)
+ CHKWIKI=1
+ CHKABSOLUTE=1
+ CHKEXTERNAL=1
+ CHKRELATIVE=1
+ ;;
+ *)
+ printhelp
+ exit 1
+ ;;
+ esac
+done
+
+EXITCODE=0
+
+if [ -z "${file}" ] ; then
+ if [ $RECURSIVE -eq 0 ] ; then
+ printhelp
+ exit 1
+ fi
+ for f in $(find . -type d \( -path ./${GENERATOR_DIR} -o -path ./node_modules \) -prune -o -name "*.md" -print); do
+ checklinks "$f"
+ done
+else
+ if [ $RECURSIVE -eq 1 ] ; then
+ printhelp
+ exit 1
+ fi
+ checklinks "$file"
+fi
+
+exit $EXITCODE
diff --git a/docs/generator/requirements.txt b/docs/generator/requirements.txt
new file mode 100644
index 0000000000..5021831087
--- /dev/null
+++ b/docs/generator/requirements.txt
@@ -0,0 +1,3 @@
+mkdocs>=1.0.1
+mkdocs-material
+
diff --git a/docs/generator/runtime.txt b/docs/generator/runtime.txt
new file mode 100644
index 0000000000..d70c8f8d89
--- /dev/null
+++ b/docs/generator/runtime.txt
@@ -0,0 +1 @@
+3.6
diff --git a/docs/generator/themes/material/partials/footer.html b/docs/generator/themes/material/partials/footer.html
new file mode 100644
index 0000000000..ba690f236c
--- /dev/null
+++ b/docs/generator/themes/material/partials/footer.html
@@ -0,0 +1,57 @@
+{% import "partials/language.html" as lang with context %}
+<footer class="md-footer">
+ {% if page.previous_page or page.next_page %}
+ <div class="md-footer-nav">
+ <nav class="md-footer-nav__inner md-grid">
+ {% if page.previous_page %}
+ <a href="{{ page.previous_page.url | url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
+ <div class="md-flex__cell md-flex__cell--shrink">
+ <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
+ </div>
+ <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
+ <span class="md-flex__ellipsis">
+ <span class="md-footer-nav__direction">
+ {{ lang.t("footer.previous") }}
+ </span>
+ {{ page.previous_page.title }}
+ </span>
+ </div>
+ </a>
+ {% endif %}
+ {% if page.next_page %}
+ <a href="{{ page.next_page.url | url }}" title="{{ page.next_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
+ <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
+ <span class="md-flex__ellipsis">
+ <span class="md-footer-nav__direction">
+ {{ lang.t("footer.next") }}
+ </span>
+ {{ page.next_page.title }}
+ </span>
+ </div>
+ <div class="md-flex__cell md-flex__cell--shrink">
+ <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
+ </div>
+ </a>
+ {% endif %}
+ </nav>
+ </div>
+ {% endif %}
+ <div class="md-footer-meta md-typeset">
+ <div class="md-footer-meta__inner md-grid">
+ <div class="md-footer-copyright">
+ {% if config.copyright %}
+ <div class="md-footer-copyright__highlight">
+ {{ config.copyright }}
+ </div>
+ {% endif %}
+ <a href="https://twitter.com/linuxnetdata" rel="nofollow"><img src="https://img.shields.io/twitter/follow/linuxnetdata.svg?style=social&amp;label=New%20-%20stay%20in%20touch%20-%20follow%20netdata%20on%20twitter"></a>
+ <img src="https://www.google-analytics.com/collect?v=1&amp;t=pageview&amp;_s=1&amp;ds=github&amp;dr=https%3A%2F%2Fgithub.com%2Ffirehol%2Fnetdata%2Fwiki&amp;dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Fwiki&amp;_u=MAC%7E&amp;cid=8c51788e-8721-45e3-ae8c-e7c63ba8236b&amp;tid=UA-64295674-3">
+
+
+ </div>
+ {% block social %}
+ {% include "partials/social.html" %}
+ {% endblock %}
+ </div>
+ </div>
+</footer>