From 82628cc349d588948a5c8431110ea3d2e5df5f1b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sat, 8 Apr 2017 14:21:58 -0700 Subject: Setup publish script for RSS --- www/publish.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'www') 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="Back to previous index" + 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 -- cgit v1.2.3-70-g09d2