aboutsummaryrefslogtreecommitdiff
path: root/www/publish.sh
diff options
context:
space:
mode:
authorLeah Rowe <info@minifree.org>2017-04-08 21:32:47 +0000
committerGogs <gogitservice@gmail.com>2017-04-08 21:32:47 +0000
commitcbd70f62fd0944e42d5281418f7a3f004eb73f2e (patch)
treee15e55902a321231b117452ff21283cb0a95aa32 /www/publish.sh
parent34eaf8660a011930bc1a46c93f2db69cf3c28a01 (diff)
parent8a509204473e2922e60c806e65e7829d0e2d2cde (diff)
downloadlibrebootfr-cbd70f62fd0944e42d5281418f7a3f004eb73f2e.tar.gz
librebootfr-cbd70f62fd0944e42d5281418f7a3f004eb73f2e.zip
Merge branch 'blog/rss' of libreboot/libreboot into master
Diffstat (limited to 'www/publish.sh')
-rwxr-xr-xwww/publish.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/www/publish.sh b/www/publish.sh
index 4a580787..6f35fd93 100755
--- a/www/publish.sh
+++ b/www/publish.sh
@@ -24,6 +24,8 @@ FILE=${1%.md}
cat $1 > temp.md
+OPTS=
+
if [ "${FILE}" != "./index" ]; then
if [[ $FILE == *index ]]
then
@@ -33,6 +35,7 @@ if [ "${FILE}" != "./index" ]; then
fi
RETURN="<a href='$DEST'>Back to previous index</a>"
+ OPTS="--css /headerleft.css -T Libreboot"
fi
echo "" >> temp.md
@@ -48,13 +51,9 @@ TOC=$(grep -q "^x-toc-enable: true$" temp.md && echo "--toc --toc-depth=2") || T
# work around heterogenous pandoc versions
SMART=$(pandoc -v | grep -q '2\.0' || echo "--smart") || SMART=""
-
-
-if [ "${FILE}" != "./index" ]; then
- # chuck through pandoc
- pandoc $TOC $SMART temp.md -s --css /global.css --css /headerleft.css -T Libreboot \
+# chuck through pandoc
+pandoc $TOC $SMART temp.md -s --css /global.css $OPTS \
--template template.html --metadata return="$RETURN"> $FILE.html
-else
- pandoc $TOC $SMART temp.md -s --css /global.css \
- --template template.html --metadata return="$RETURN"> $FILE.html
-fi
+
+# additionally, produce bare file for RSS
+pandoc $1 > $FILE.bare.html