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 [](https://travis-ci.com/netdata/netdata) [](https://bestpractices.coreinfrastructure.org/projects/2231) [](https://www.gnu.org/licenses/gpl-3.0) [](<>)"
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