summaryrefslogtreecommitdiffstats
path: root/docs/generator
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:22:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 01:22:31 +0000
commit8d4f58e49b9dc7d3545651023a36729de773ad86 (patch)
tree7bc7be4a8e9e298daa1349348400aa2a653866f2 /docs/generator
parentInitial commit. (diff)
downloadnetdata-8d4f58e49b9dc7d3545651023a36729de773ad86.tar.xz
netdata-8d4f58e49b9dc7d3545651023a36729de773ad86.zip
Adding upstream version 1.12.0.upstream/1.12.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/generator')
-rwxr-xr-xdocs/generator/buildhtml.sh60
-rwxr-xr-xdocs/generator/buildyaml.sh238
-rwxr-xr-xdocs/generator/checklinks.sh394
-rw-r--r--docs/generator/custom/css/netdata.css3
-rw-r--r--docs/generator/custom/img/favicon.icobin0 -> 1150 bytes
-rw-r--r--docs/generator/custom/javascripts/cookie-consent.js15
-rw-r--r--docs/generator/custom/themes/material/partials/footer.html54
-rw-r--r--docs/generator/requirements.txt2
-rw-r--r--docs/generator/runtime.txt1
9 files changed, 767 insertions, 0 deletions
diff --git a/docs/generator/buildhtml.sh b/docs/generator/buildhtml.sh
new file mode 100755
index 0000000..3cc87d2
--- /dev/null
+++ b/docs/generator/buildhtml.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+# buildhtml.sh
+
+# Builds the html static site, using mkdocs
+
+set -e
+
+# 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
+
+# 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
+
+# Remove all GA tracking code
+find ${GENERATOR_DIR}/src -name "*.md" -print0 | xargs -0 sed -i -e 's/\[!\[analytics.*UA-64295674-3)\]()//g'
+
+# Remove specific files that don't belong in the documentation
+declare -a EXCLUDE_LIST=(
+ "HISTORICAL_CHANGELOG.md"
+ "contrib/sles11/README.md"
+ "packaging/maintainers/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 [ "${1}" != "nomkdocs" ] ; then
+ echo "Calling mkdocs"
+
+ # Build html docs
+ mkdocs build --config-file=${GENERATOR_DIR}/mkdocs.yml
+fi
+
+echo "Finished"
diff --git a/docs/generator/buildyaml.sh b/docs/generator/buildyaml.sh
new file mode 100755
index 0000000..a86b139
--- /dev/null
+++ b/docs/generator/buildyaml.sh
@@ -0,0 +1,238 @@
+#!/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
+extra:
+ social:
+ - type: "github"
+ link: "https://github.com/netdata/netdata"
+ - type: "twitter"
+ link: "https://twitter.com/linuxnetdata"
+ - type: "facebook"
+ link: "https://www.facebook.com/linuxnetdata/"
+theme:
+ name: "material"
+ custom_dir: custom/themes/material
+ favicon: custom/img/favicon.ico
+extra_css:
+ - "https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.css"
+ - "custom/css/netdata.css"
+extra_javascript:
+ - "custom/javascripts/cookie-consent.js"
+ - "https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"
+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.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/Demo-Sites.md'
+ - 'docs/netdata-security.md'
+ - 'docs/anonymous-statistics.md'
+ - 'docs/Donations-netdata-has-received.md'
+ - 'docs/a-github-star-is-important.md'
+ - REDISTRIBUTED.md
+ - CHANGELOG.md
+ - CONTRIBUTING.md
+- Why Netdata:
+ - 'docs/why-netdata/README.md'
+ - 'docs/why-netdata/1s-granularity.md'
+ - 'docs/why-netdata/unlimited-metrics.md'
+ - 'docs/why-netdata/meaningful-presentation.md'
+ - 'docs/why-netdata/immediate-results.md'
+- Installation:
+ - 'packaging/installer/README.md'
+ - 'packaging/docker/README.md'
+ - 'packaging/installer/UPDATE.md'
+ - 'packaging/installer/UNINSTALL.md'
+- 'docs/GettingStarted.md'
+- Running netdata:
+ - 'daemon/README.md'
+ - 'docs/configuration-guide.md'
+ - 'daemon/config/README.md'
+ - 'docs/Charts.md'
+"
+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/apps.plugin
+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
+echo -ne " - BASH modules:
+ - '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'
+"
+
+navpart 3 collectors/fping.plugin
+navpart 3 collectors/freeipmi.plugin
+navpart 3 collectors/cups.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:
+ - CODE_OF_CONDUCT.md
+ - 'docs/Netdata-Security-and-Disclosure-Information.md'
+ - CONTRIBUTORS.md
+"
+navpart 2 packaging/makeself "" "" 4
+navpart 2 libnetdata "" "libnetdata" 4
+navpart 2 contrib
+navpart 2 tests "" "" 2
+navpart 2 diagrams/data_structures
diff --git a/docs/generator/checklinks.sh b/docs/generator/checklinks.sh
new file mode 100755
index 0000000..d0c3b16
--- /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/custom/css/netdata.css b/docs/generator/custom/css/netdata.css
new file mode 100644
index 0000000..b3db108
--- /dev/null
+++ b/docs/generator/custom/css/netdata.css
@@ -0,0 +1,3 @@
+.md-nav__link {
+ white-space: nowrap;
+}
diff --git a/docs/generator/custom/img/favicon.ico b/docs/generator/custom/img/favicon.ico
new file mode 100644
index 0000000..7ed9572
--- /dev/null
+++ b/docs/generator/custom/img/favicon.ico
Binary files differ
diff --git a/docs/generator/custom/javascripts/cookie-consent.js b/docs/generator/custom/javascripts/cookie-consent.js
new file mode 100644
index 0000000..a5c65da
--- /dev/null
+++ b/docs/generator/custom/javascripts/cookie-consent.js
@@ -0,0 +1,15 @@
+window.addEventListener("load", function(){
+window.cookieconsent.initialise({
+ "palette": {
+ "popup": {
+ "background": "#000"
+ },
+ "button": {
+ "background": "#f1d600"
+ }
+ },
+ "content": {
+ "href": "https://docs.netdata.cloud/docs/privacy-policy/"
+ }
+})});
+
diff --git a/docs/generator/custom/themes/material/partials/footer.html b/docs/generator/custom/themes/material/partials/footer.html
new file mode 100644
index 0000000..fe232b6
--- /dev/null
+++ b/docs/generator/custom/themes/material/partials/footer.html
@@ -0,0 +1,54 @@
+{% 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 }} | <a href="/docs/privacy-policy/">Privacy Policy</a> | <a href="/docs/terms-of-use/">Terms of Use</a>
+ </div>
+ {% endif %}
+ </div>
+ {% block social %}
+ {% include "partials/social.html" %}
+ {% endblock %}
+ </div>
+ </div>
+</footer>
+<script>!function(e,a,t,n,o,c,i){e.GoogleAnalyticsObject=o,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),i=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",i.parentNode.insertBefore(c,i)}(window,document,"script",0,"ga"),ga("create","UA-64295674-3",""),ga("set","anonymizeIp",!0),ga("send","pageview","/doc"+window.location.pathname);var links=document.getElementsByTagName("a");if(Array.prototype.map.call(links,function(a){a.host!=document.location.host&&a.addEventListener("click",function(){var e=a.getAttribute("data-md-action")||"follow";ga("send","event","outbound",e,a.href)})}),document.forms.search){var query=document.forms.search.query;query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}</script>
diff --git a/docs/generator/requirements.txt b/docs/generator/requirements.txt
new file mode 100644
index 0000000..ac01be7
--- /dev/null
+++ b/docs/generator/requirements.txt
@@ -0,0 +1,2 @@
+mkdocs>=1.0.1
+mkdocs-material
diff --git a/docs/generator/runtime.txt b/docs/generator/runtime.txt
new file mode 100644
index 0000000..d70c8f8
--- /dev/null
+++ b/docs/generator/runtime.txt
@@ -0,0 +1 @@
+3.6