@cryptotaxi247 / netdata-1 / commits / 9f95a6544

Add proper parsing/stripping of comments around docs frontmatter (#8372)

* Quick fix to main docs page * Strip frontmatter comments * Fix for main README

Joel Hans committed Mar 10, 2020 at 22:18 UTC 9f95a65442d009fa6b4083aadf35a803386f69fc
3 files changed +4 -8
DOCUMENTATION.md
-7
@@ -1,10 +1,3 @@
1 -<!--
2 ----
3 -title: "Netdata Documentation"
4 -custom_edit_url: https://github.com/netdata/netdata/edit/master/DOCUMENTATION.md
5 ----
6 --->
7 -
1 # Netdata Documentation
2
3 **Netdata is real-time health monitoring and performance troubleshooting for systems and applications.** It helps you
README.md
+1 -1
@@ -1,6 +1,6 @@
1 <!--
2 ---
3 -title: "Netdata [![Build Status](https://travis-ci.com/netdata/netdata.svg?branch=master)](https://travis-ci.com/netdata/netdata) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2231/badge)](https://bestpractices.coreinfrastructure.org/projects/2231) [![License: GPL v3+](https://img.shields.io/badge/License-GPL%20v3%2B-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![analytics](https://www.google-analytics.com/collect?v=1&aip=1&t=pageview&_s=1&ds=github&dr=https%3A%2F%2Fgithub.com%2Fnetdata%2Fnetdata&dl=https%3A%2F%2Fmy-netdata.io%2Fgithub%2Freadme&_u=MAC~&cid=5792dfd7-8dc4-476b-af31-da2fdb9f93d2&tid=UA-64295674-3)](<>)"
3 +title: "Netdata"
4 custom_edit_url: https://github.com/netdata/netdata/edit/master/README.md
5 ---
6 -->
docs/generator/buildhtml.sh
+3
@@ -33,6 +33,9 @@ cp -a ./${GENERATOR_DIR}/custom ./${SRC_DIR}/
33 echo "Modifying README header"
34 sed -i -e '0,/# Netdata /s//# Netdata Documentation\n\n/' ${SRC_DIR}/README.md
35
36 +# Strip comments around frontmatter.
37 +find ${SRC_DIR} -name '*.md' -exec sed -i "/<!--/d;/-->/d;" {} \;
38 +
39 # Remove all GA tracking code
40 find ${SRC_DIR} -name "*.md" -print0 | xargs -0 sed -i -e 's/\[!\[analytics.*UA-64295674-3)\]()//g'
41