aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2017-04-08 14:21:58 -0700
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>2017-04-08 14:21:58 -0700
commit82628cc349d588948a5c8431110ea3d2e5df5f1b (patch)
tree7703f1efb51e0c1dbf79e76a0c95444b7a9b1ab5 /www
parent34eaf8660a011930bc1a46c93f2db69cf3c28a01 (diff)
downloadlibrebootfr-82628cc349d588948a5c8431110ea3d2e5df5f1b.tar.gz
librebootfr-82628cc349d588948a5c8431110ea3d2e5df5f1b.zip
Setup publish script for RSS
Diffstat (limited to 'www')
-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