summaryrefslogtreecommitdiffstats
path: root/docs/generator
diff options
context:
space:
mode:
authorChris Akritidis <43294513+cakrit@users.noreply.github.com>2018-12-06 18:16:05 +0100
committerGitHub <noreply@github.com>2018-12-06 18:16:05 +0100
commitf1036f74f7045ecca98ce2cad96ab7b6b0c239d1 (patch)
tree9ec931d8e6d91e23beb0795fe20f9bf622549c94 /docs/generator
parent31f14e5855c133aefba4aa91a5466f19bb1be540 (diff)
Config docs improvements (#4918)
* WIP to add a new config readme * WIP * WIP * WIP * WIP * WIP * Major rewrite of configuration instructions and minor improvements to the html doc site * Major rewrite of configuration instructions and minor improvements to the html doc site * Major rewrite of configuration instructions and minor improvements to the html doc site * Major rewrite of configuration instructions and minor improvements to the html doc site * Major rewrite of configuration instructions and minor improvements to the html doc site * Major rewrite of configuration instructions and minor improvements to the html doc site * Major rewrite of configuration instructions and minor improvements to the html doc site * Major rewrite of configuration instructions and minor improvements to the html doc site
Diffstat (limited to 'docs/generator')
-rwxr-xr-xdocs/generator/buildhtml.sh11
-rwxr-xr-xdocs/generator/buildyaml.sh26
-rwxr-xr-xdocs/generator/checklinks.sh2
-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.html (renamed from docs/generator/themes/material/partials/footer.html)0
7 files changed, 38 insertions, 19 deletions
diff --git a/docs/generator/buildhtml.sh b/docs/generator/buildhtml.sh
index 347a777a08..410b0fc84d 100755
--- a/docs/generator/buildhtml.sh
+++ b/docs/generator/buildhtml.sh
@@ -19,6 +19,9 @@ 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/' -e 's/\[!\[analytics.*UA-64295674-3)\]()//g' ${GENERATOR_DIR}/src/README.md
@@ -44,9 +47,11 @@ echo "Fixing links"
# Fix links (recursively, all types, executing replacements)
${GENERATOR_DIR}/checklinks.sh -rax
-echo "Calling mkdocs"
+if [ "${1}" != "nomkdocs" ] ; then
+ echo "Calling mkdocs"
-# Build html docs
-mkdocs build --config-file=${GENERATOR_DIR}/mkdocs.yml
+ # 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
index 81ad77bba7..7c95682387 100755
--- a/docs/generator/buildyaml.sh
+++ b/docs/generator/buildyaml.sh
@@ -63,11 +63,13 @@ extra:
link: "https://www.facebook.com/linuxnetdata/"
theme:
name: "material"
- custom_dir: themes/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:
- - "javascripts/cookie-consent.js"
+ - "custom/javascripts/cookie-consent.js"
- "https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.1.0/cookieconsent.min.js"
markdown_extensions:
- extra
@@ -123,23 +125,17 @@ echo -ne " - 'docs/Why-Netdata.md'
- REDISTRIBUTED.md
- CHANGELOG.md
- CONTRIBUTING.md
-"
-
-echo -ne "- Installation:
+- Installation:
- 'installer/README.md'
- 'packaging/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
-echo -ne " - 'docs/Charts.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
diff --git a/docs/generator/checklinks.sh b/docs/generator/checklinks.sh
index 628c6aee5c..d0c3b165ce 100755
--- a/docs/generator/checklinks.sh
+++ b/docs/generator/checklinks.sh
@@ -119,7 +119,7 @@ testinternal () {
ilnk=${3}
header=${ilnk//-/}
dbg "-- Searching for \"$header\" in $ifile"
- tr -d ',_.:? `'< "$ifile" | sed 's/-//g' | grep -i "^\\#*$header\$" >/dev/null
+ tr -d '[],_.:? `'< "$ifile" | sed 's/-//g' | grep -i "^\\#*$header\$" >/dev/null
if [ $? -eq 0 ] ; then
dbg "-- $ilnk found in $ifile"
return 0
diff --git a/docs/generator/custom/css/netdata.css b/docs/generator/custom/css/netdata.css
new file mode 100644
index 0000000000..b3db108835
--- /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 0000000000..7ed9572529
--- /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 0000000000..a5c65da495
--- /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/themes/material/partials/footer.html b/docs/generator/custom/themes/material/partials/footer.html
index 1207966abd..1207966abd 100644
--- a/docs/generator/themes/material/partials/footer.html
+++ b/docs/generator/custom/themes/material/partials/footer.html