summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2020-05-22 04:35:09 +1000
committerGitHub <noreply@github.com>2020-05-22 04:35:09 +1000
commitc93038d7f98afe8b288fce33f7ad5b808c24eef1 (patch)
tree78a52591979518263dc28428324ab379a9492a29 /docs
parent3d2111b6c704de713260f82492fe6a1676f1d634 (diff)
Remove old docs generation tooling (#8783)
* Remove old docs generation tooling * Remove more references to docs/generator/* * Remove more refernece to things no longer used for docs generation * Update contributing-documentation.md * Update contributing-documentation.md Co-authored-by: Joel Hans <joel.g.hans@gmail.com>
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/generator/buildhtml.sh114
-rwxr-xr-xdocs/generator/buildyaml.sh306
-rwxr-xr-xdocs/generator/checklinks.sh361
-rw-r--r--docs/generator/custom/css/netdata.css535
-rwxr-xr-xdocs/generator/custom/img/favicon.icobin313 -> 0 bytes
-rw-r--r--docs/generator/custom/img/geography-16.pngbin461 -> 0 bytes
-rw-r--r--docs/generator/custom/img/netdata_docs.pngbin59641 -> 0 bytes
-rwxr-xr-xdocs/generator/custom/img/netdata_logo.svg1
-rwxr-xr-xdocs/generator/custom/img/netdata_text.svg1
-rw-r--r--docs/generator/custom/javascripts/cookie-consent.js15
-rw-r--r--docs/generator/custom/themes/material/main.html43
-rw-r--r--docs/generator/custom/themes/material/partials/footer.html76
-rw-r--r--docs/generator/custom/themes/material/partials/header.html104
-rw-r--r--docs/generator/requirements.txt2
-rw-r--r--docs/generator/runtime.txt1
15 files changed, 0 insertions, 1559 deletions
diff --git a/docs/generator/buildhtml.sh b/docs/generator/buildhtml.sh
deleted file mode 100755
index 6626a56211..0000000000
--- a/docs/generator/buildhtml.sh
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/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"
-SRC_DIR="${GENERATOR_DIR}/src"
-# Fetch go.d.plugin docs
-GO_D_DIR="collectors/go.d.plugin"
-rm -rf ${GO_D_DIR}
-git clone https://github.com/netdata/go.d.plugin.git ${GO_D_DIR}
-find "${GO_D_DIR}" -maxdepth 1 -mindepth 1 -type d ! -name modules -exec rm -rf '{}' \;
-
-# 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 ${SRC_DIR}
-mkdir ${SRC_DIR}
-find . -type d \( -path ./${GENERATOR_DIR} -o -path ./node_modules \) -prune -o -name "*.md" -exec cp -pr --parents '{}' ./${SRC_DIR}/ ';'
-
-# Copy Netdata html resources
-cp -a ./${GENERATOR_DIR}/custom ./${SRC_DIR}/
-
-# 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//# Netdata Documentation\n\n/' ${SRC_DIR}/README.md
-
-# Strip comments around frontmatter.
-find ${SRC_DIR} -name '*.md' -exec sed -i "/<!--/d;/-->/d;" {} \;
-
-# Remove all GA tracking code
-find ${SRC_DIR} -name "*.md" -print0 | xargs -0 sed -i -e 's/\[!\[analytics.*UA-64295674-3)\]()//g'
-
-# Use h1 heading as page title for collectors pages
-find ${SRC_DIR}/collectors/ -type f -name 'README.md' -exec sed -i -e '1 s|^# \(.*\)|title: \1\n---\n\n# \1\n|' {} \;
-
-# Remove specific files that don't belong in the documentation
-declare -a EXCLUDE_LIST=(
- "HISTORICAL_CHANGELOG.md"
- "contrib/sles11/README.md"
-)
-
-for f in "${EXCLUDE_LIST[@]}"; do
- rm "${SRC_DIR}/$f"
-done
-
-echo "Fetching localization project"
-LOC_DIR=${GENERATOR_DIR}/localization
-rm -rf ${LOC_DIR}
-git clone https://github.com/netdata/localization.git ${LOC_DIR}
-
-echo "Preparing directories"
-MKDOCS_CONFIG_FILE="${GENERATOR_DIR}/mkdocs.yml"
-MKDOCS_DIR="doc"
-DOCS_DIR=${GENERATOR_DIR}/${MKDOCS_DIR}
-rm -rf ${DOCS_DIR}
-
-prep_html() {
- lang="${1}"
- echo "Creating ${lang} mkdocs.yaml"
-
- if [ "${lang}" == "en" ] ; then
- SITE_DIR="build"
- else
- SITE_DIR="build/${lang}"
- fi
-
- # Generate mkdocs.yaml
- ${GENERATOR_DIR}/buildyaml.sh ${MKDOCS_DIR} ${SITE_DIR} ${lang}>${MKDOCS_CONFIG_FILE}
-
- echo "Fixing links"
-
- # Fix links (recursively, all types, executing replacements)
- ${GENERATOR_DIR}/checklinks.sh -rax
-
- echo "Calling mkdocs"
-
- # Build html docs
- mkdocs build --config-file="${MKDOCS_CONFIG_FILE}"
-
- # Fix edit buttons for the markdowns that are not on the main Netdata repo
- find "${GENERATOR_DIR}/${SITE_DIR}/${GO_D_DIR}" -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'
- if [ "${lang}" != "en" ] ; then
- find "${GENERATOR_DIR}/${SITE_DIR}" -name "*.html" -print0 | xargs -0 sed -i -e 's/https:\/\/github.com\/netdata\/netdata\/blob\/master\/\S*md/https:\/\/github.com\/netdata\/localization\//g'
- fi
-
- # Replace index.html with DOCUMENTATION/index.html. Since we're moving it up one directory, we need to remove ../ from the links
- echo "Replacing index.html with DOCUMENTATION/index.html"
- sed 's/\.\.\///g' ${GENERATOR_DIR}/${SITE_DIR}/DOCUMENTATION/index.html > ${GENERATOR_DIR}/${SITE_DIR}/index.html
-
-}
-
-for d in "en" "kr" "zh" "pt" ; do
- echo "Preparing source for $d"
- cp -r ${SRC_DIR} ${DOCS_DIR}
- if [ "${d}" != "en" ] ; then
- cp -a ${LOC_DIR}/${d}/* ${DOCS_DIR}/
- fi
- prep_html $d
- rm -rf ${DOCS_DIR}
-done
-
-# Remove cloned projects and temp directories
-rm -rf ${GO_D_DIR} ${LOC_DIR} ${DOCS_DIR} ${SRC_DIR}
-
-echo "Finished"
diff --git a/docs/generator/buildyaml.sh b/docs/generator/buildyaml.sh
deleted file mode 100755
index 6d188d4295..0000000000
--- a/docs/generator/buildyaml.sh
+++ /dev/null
@@ -1,306 +0,0 @@
-#!/bin/bash
-
-GENERATOR_DIR="docs/generator"
-
-docs_dir="${1}"
-site_dir="${2}"
-language="${3}"
-
-cd ${GENERATOR_DIR}/${docs_dir}
-
-# getlastdir parses file path and returns last directory name.
-# It expects path to be not empty , '/' as a delimeter and at least one '/' in the path.
-getlastdir() {
- local IFS=/
- read -ra array <<< "$1"
- echo "${array[((${#array[@]} - 2))]}"
-}
-
-# 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
- useLastDirAsPageName=$7
- 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
-
- local pagename
- for f in $(find "$dir" -mindepth $mindepth -maxdepth $maxdepth -name "${file}.md" -printf '%h|%d|%p\n' | sort -t '|' -n | awk -F '|' '{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"
- pagename="'$f'"
- if [ -n "$useLastDirAsPageName" ]; then
- pagename="'$(getlastdir "$f")' : '$f'"
- fi
-
- if [ -z "$section" ]; then
- echo "$spc- $pagename"
- else
- echo "$spc - $pagename"
- fi
- done
-}
-
-echo -e "site_name: Netdata Documentation
-site_url: https://docs.netdata.cloud
-repo_url: https://github.com/netdata/netdata
-repo_name: GitHub
-edit_uri: blob/master
-site_description: Learn about Netdata's real-time health monitoring and performance troubleshooting for all your systems and applications.
-copyright: Netdata, 2020
-docs_dir: '${docs_dir}'
-site_dir: '${site_dir}'
-#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
- palette:
- primary: 'blue grey'
- accent: 'light green'
- custom_dir: custom/themes/material
- favicon: custom/img/favicon.ico
- logo: custom/img/netdata_logo.svg
- language: '${language}'
-extra_css:
- - 'https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.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
- - meta
- - sane_lists
- - smarty
- - toc:
- permalink: True
- separator: '-'
- - wikilinks
- - pymdownx.arithmatex
- - pymdownx.betterem:
- smart_enable: all
- - pymdownx.caret
- - pymdownx.critic
- - pymdownx.details
- - pymdownx.highlight:
- pygments_style: manni
- css_class: 'highlight codehilite'
- linenums_style: pymdownx-inline
- - 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" ""
-
-navpart 1 . . "About Netdata"
-
-echo -ne " - 'docs/what-is-netdata.md'
- - '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
- - SECURITY.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'
- - Other methods:
- - 'packaging/installer/methods/packages.md'
- - 'packaging/installer/methods/kickstart.md'
- - 'packaging/installer/methods/kickstart-64.md'
- - 'packaging/docker/README.md'
- - 'packaging/installer/methods/cloud-providers.md'
- - 'packaging/installer/methods/macos.md'
- - 'packaging/installer/methods/freebsd.md'
- - 'packaging/installer/methods/manual.md'
- - 'packaging/installer/methods/offline.md'
- - 'packaging/installer/methods/pfsense.md'
- - 'packaging/installer/methods/synology.md'
- - 'packaging/installer/methods/freenas.md'
- - 'packaging/installer/methods/alpine.md'
- - 'packaging/DISTRIBUTIONS.md'
- - 'packaging/installer/UPDATE.md'
- - 'packaging/installer/UNINSTALL.md'
-- 'docs/getting-started.md'
-"
-navpart 1 docs/step-by-step "" "Step-by-step tutorial" 1
-# navpart 1 health README "Alarms and notifications"
-echo -ne "
-- Running Netdata:
- - 'daemon/README.md'
- - 'docs/configuration-guide.md'
- - 'daemon/config/README.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'
- - 'docs/Running-behind-haproxy.md'
-"
-#navpart 2 system
-navpart 2 database
-navpart 2 database/engine
-navpart 2 registry
-
-echo -ne " - 'docs/Performance.md'
- - 'docs/netdata-for-IoT.md'
- - 'docs/high-performance-netdata.md'
-"
-
-navpart 1 collectors README "Collecting metrics"
-echo -ne "
- - 'collectors/QUICKSTART.md'
- - 'collectors/COLLECTORS.md'
- - 'collectors/REFERENCE.md'
- - Internal plugins:
- - eBPF metrics: collectors/ebpf.plugin/README.md
-"
-
-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/checks.plugin
-navpart 3 collectors/diskspace.plugin
-navpart 3 collectors/freebsd.plugin
-navpart 3 collectors/macos.plugin
-
-navpart 2 collectors/plugins.d "" "External plugins"
-
-echo -ne " - Go:
- - 'collectors/go.d.plugin/README.md'
-"
-navpart 4 collectors/go.d.plugin "" "Modules" 3 excludefirstlevel useLastDirAsPageName
-
-echo -ne " - Python:
- - 'collectors/python.d.plugin/README.md'
-"
-navpart 4 collectors/python.d.plugin "" "Modules" 3 excludefirstlevel useLastDirAsPageName
-
-echo -ne " - Node.js:
- - 'collectors/node.d.plugin/README.md'
-"
-navpart 4 collectors/node.d.plugin "" "Modules" 3 excludefirstlevel useLastDirAsPageName
-
-echo -ne " - BASH:
- - 'collectors/charts.d.plugin/README.md'
-"
-navpart 4 collectors/charts.d.plugin "" "Modules" 3 excludefirstlevel useLastDirAsPageName
-
-navpart 3 collectors/apps.plugin
-navpart 3 collectors/cups.plugin
-navpart 3 collectors/fping.plugin
-navpart 3 collectors/ioping.plugin
-navpart 3 collectors/freeipmi.plugin
-navpart 3 collectors/nfacct.plugin
-navpart 3 collectors/xenstat.plugin
-navpart 3 collectors/perf.plugin
-navpart 3 collectors/slabinfo.plugin
-
-navpart 1 . netdata-cloud "Netdata Cloud"
-echo -ne "
- - 'docs/netdata-cloud/README.md'
- - 'docs/netdata-cloud/signing-in.md'
- - 'docs/netdata-cloud/nodes-view.md'
-"
-
-navpart 1 web "README" "Dashboards"
-navpart 2 web/gui "" "" 3
-
-navpart 1 health README "Health monitoring and alerts"
-echo -ne " - 'health/QUICKSTART.md'
- - 'health/REFERENCE.md'
-"
-navpart 2 health/tutorials "" "Tutorials" 2
-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/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 "- Contributing to Netdata:
- - CONTRIBUTING.md
- - 'docs/contributing/contributing-documentation.md'
- - 'docs/contributing/style-guide.md'
- - CODE_OF_CONDUCT.md
- - CONTRIBUTORS.md
- - packaging/maintainers/README.md
-"
-
-echo -ne "- Additional information:
-"
-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
deleted file mode 100755
index 77a950e210..0000000000
--- a/docs/generator/checklinks.sh
+++ /dev/null
@@ -1,361 +0,0 @@
-#!/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"
-MKDOCS_DIR="doc"
-DOCS_DIR=${GENERATOR_DIR}/${MKDOCS_DIR}
-
-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 Tries 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
-}
-
-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 -e 's/-//g' -e "s/'//g" -e "s/(//g" -e "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"
- ;;
- /* )
- # Handle links in Markdown files that begin with `/`.
- dbg " - # (/path/filename.md) -> htmldoc (/path/filename/)"
- # For links that end in `.md`.
- if [[ $rlnk =~ ^(.*)/(.*).md$ ]] ; then
- testf "$f" ".$rlnk"
-
- if [ "${BASH_REMATCH[2]}" = "README" ] ; then
- s="${BASH_REMATCH[1]}/"
- else
- s="${BASH_REMATCH[1]}/${BASH_REMATCH[2]}/"
- fi
- fi
- # For links that end in `.md#...`.
- if [[ $lnk =~ ^(.*)/(.*).md#(.*)$ ]] ; then
- TRGT=".${BASH_REMATCH[1]}/${BASH_REMATCH[2]}.md"
- LNK="#${BASH_REMATCH[3]}"
- testf "$f" "$TRGT"
- testinternal "$f" "$TRGT" "$LNK"
-
- 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
- fi
- ;;
- */ )
- 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 [ -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
- cd - >/dev/null
- 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
- echo " - ERROR: $f - $rlnk is neither a file or a directory. Giving up!"
- EXITCODE=1
- fi
- cd $DOCS_DIR >/dev/null
- 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' $f"
- fi
-}
-
-
-checklinks () {
- f=$1
- dbg "Checking $f"
- while read -r l ; do
- for word in $l ; do
- if [[ $word =~ .*\]\(([^\(\) ]*)\).* ]] ; then
- lnk=$(echo "${BASH_REMATCH[1]}" | tr -d '<>')
- 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* )
- echo " - ERROR: $f - $lnk is an absolute link to a Netdata file. Please convert to relative."
- EXITCODE=1
- ;;
- 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
- cd ${DOCS_DIR}
- for f in $(find . -type d \( -path ./${GENERATOR_DIR} -o -path ./node_modules \) -prune -o -name "*.md" -print); do
- checklinks "$f"
- done
- cd -
-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
deleted file mode 100644
index 2ca0dcc249..0000000000
--- a/docs/generator/custom/css/netdata.css
+++ /dev/null
@@ -1,535 +0,0 @@
-/* Fonts */
-@import url('https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,400i,500,700,700i&display=swap');
-
-body, input {
- font-family: "IBM Plex Sans","Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;
-}
-
-.md-typeset {
- font-size: .85rem;
- line-height: 1.5;
-}
-
-/* Main structure */
-.md-container {
- flex-flow: row wrap;
-}
-
-.md-grid {
- max-width: 80rem;
- display: flex;
- position: relative;
- overflow: visible;
- flex-direction: row;
- justify-content: space-between;
-}
-
-.md-content {
- margin-right: 0;
- margin-bottom: 6rem;
- margin-left: 0;
- max-width: 45rem;
- overflow: hidden;
-}
-
-.md-sidebar[data-md-state="lock"] {
- position: sticky;
-}
-
-.md-sidebar {
- position: sticky;
- flex: 0 0 320px;
-}
-
-.md-sidebar--secondary {
- right: 0;
- margin-left: 0;
- transform: none;
- order: 3;
-}
-
-.md-content__inner {
- margin-right: 2.5rem;
- margin-left: 2.5rem;
-}
-
-@media screen and (max-width: 76.1875em) {
- .md-sidebar--primary {
- position: fixed;
- }
-}
-
-@media only screen and (max-width: 500px) {
- .md-content__inner {
- margin-right: 1rem;
- margin-left: 1rem;
- }
-}
-
-/*
- Navigation
-*/
-
-.md-header-nav {
- padding: 0 0.6rem;
-}
-
-@media only screen and (max-width: 76.25em) {
- .md-header-nav {
- padding: 0 2.5rem;
- }
-}
-
-@media only screen and (max-width: 500px) {
- .md-header-nav {
- padding: 0.3rem 1rem;
- }
-
- .md-header-nav__title {
- display: none;
- }
-}
-
-[data-md-color-primary="blue-grey"] .md-header {
- background: #35414A;
-}
-
-html [data-md-color-primary="blue-grey"] .md-nav--primary .md-nav__title--site {
- background-color: #35414A;
-}
-
-[data-md-color-primary="blue-grey"] .md-nav__source {
- background-color: #546e7a
-}
-
-.md-flex__cell {
- vertical-align: middle;
-}
-
-.md-header-nav__button {
- margin: 0;
- padding: 0;
- top: 2px;
-}
-
-/* Change the language selector dropdown to match new color. */
-.md-header-nav select#sel {
- background-color: rgba(0,0,0,.26) !important;
- padding: 3px;
- margin-left: 5px;
- margin-right: 20px;
-}
-
-@media only screen and (max-width: 500px) {
- img[src='/custom/img/geography-16.png'] {
- display: none;
- }
-
- .md-header-nav select#sel {
- margin: 0;
- }
-}
-
-/* Algolia search */
-#search_algolia {
- font-size: 0.7rem;
- padding: 0.4rem;
- border-radius: 3px;
- min-width: 300px;
-}
-
-@media only screen and (max-width: 76.25em) {
- #search_algolia {
- min-width: 100px;
- }
-}
-
-@media only screen and (max-width: 700px) {
- #search_algolia {
- width: 150px;
- }
-}
-
-@media only screen and (max-width: 500px) {
- #search_algolia {
- width: 100px;
- }
-}
-
-.algolia-autocomplete .algolia-docsearch-suggestion--category-header {
- font-size: 0.9rem !important;
-}
-
-.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column {
- font-size: 0.7rem;
-}
-
-.algolia-autocomplete .algolia-docsearch-suggestion--title {
- font-size: 0.8rem;
-}
-
-.algolia-autocomplete .algolia-docsearch-suggestion--text {
- font-size: 0.7rem;
- line-height: 1.5;
-}
-
-.algolia-autocomplete .algolia-docsearch-suggestion--category-header .algolia-docsearch-suggestion--category-header-lvl0 .algolia-docsearch-suggestion--highlight,
-.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight {
- box-shadow: inset 0 -1px 0 0 #00CB51;
-}
-
-.algolia-autocomplete .algolia-docsearch-suggestion--highlight {
- color: #00AB44;
- background: #F1F2F3;
-}
-
-@media only screen and (max-width: 768px) {
- .algolia-autocomplete .algolia-docsearch-suggestion .algolia-docsearch-suggestion--subcategory-column {
- font-size: 0.7rem;
- font-weight: 400;
- }
-
- .algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu {
- right: -150px !important;
- }
-
- .algolia-autocomplete.algolia-autocomplete-right .ds-dropdown-menu::before {
- right: 248px;
- }
-}
-
-@media only screen and (max-width: 600px) {
- .algolia-autocomplete .ds-dropdown-menu {
- min-