aboutsummaryrefslogtreecommitdiff
path: root/www/publish.sh
diff options
context:
space:
mode:
Diffstat (limited to 'www/publish.sh')
-rwxr-xr-xwww/publish.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/www/publish.sh b/www/publish.sh
index 6de15662..c8838f17 100755
--- a/www/publish.sh
+++ b/www/publish.sh
@@ -3,23 +3,26 @@
echo $1
FILE=${1%.md}
-# if not homepage, add a link back to the homepage
+cat $1 > temp.md
+
+# add footer
+
+echo '' >> temp.md
+
if [ "${FILE}" != "./index" ]; then
- RETURN="<p><a href='/index.html'>Go back to homepage</a></p>"
+ echo -ne '[Back to home](/index.html) -- ' >> temp.md
fi
-cat $1 > temp.md
echo "[License](license.md)" >> temp.md
# change out .md -> .html
sed temp.md -i -e 's/\.md\(#[a-z\-]*\)*)/.html\1)/g'
# work around issue #2872
-TOC=$(grep -q "^x-toc-enable: true$" temp.md && echo "--toc")
+TOC=$(grep -q "^x-toc-enable: true$" temp.md && echo "--toc --toc-depth=2")
# work around heterogenous pandoc versions
SMART=$(pandoc -v | grep -q '2\.0' || echo "--smart")
# chuck through pandoc
-pandoc $SMART temp.md -s --css /global.css --section-divs -T Libreboot $TOC \
- --template=template.html --metadata "return=$RETURN" > $FILE.html
+pandoc $TOC $SMART temp.md -s --css /global.css -T Libreboot > $FILE.html