From c44c1ae113723673e20983a42802243951a3f016 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 4 Apr 2017 19:28:32 -0700 Subject: Bad indexing with templates --- www/publish.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'www/publish.sh') diff --git a/www/publish.sh b/www/publish.sh index c8838f17..1039e0eb 100755 --- a/www/publish.sh +++ b/www/publish.sh @@ -5,14 +5,18 @@ FILE=${1%.md} cat $1 > temp.md -# add footer - -echo '' >> temp.md - if [ "${FILE}" != "./index" ]; then - echo -ne '[Back to home](/index.html) -- ' >> temp.md + if [[ $FILE == *index ]] + then + DEST=".." + else + DEST="index.html" + fi + + RETURN="Back to previous index" fi +echo "" >> temp.md echo "[License](license.md)" >> temp.md # change out .md -> .html @@ -25,4 +29,4 @@ TOC=$(grep -q "^x-toc-enable: true$" temp.md && echo "--toc --toc-depth=2") SMART=$(pandoc -v | grep -q '2\.0' || echo "--smart") # chuck through pandoc -pandoc $TOC $SMART temp.md -s --css /global.css -T Libreboot > $FILE.html +pandoc $TOC $SMART temp.md -s --css /global.css -T Libreboot --template template.html --metadata return="$RETURN"> $FILE.html -- cgit v1.2.3-70-g09d2 From aa529a3150d1a921c9a48854d89013476f85657a Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 4 Apr 2017 19:52:01 -0700 Subject: License publish --- www/publish.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'www/publish.sh') diff --git a/www/publish.sh b/www/publish.sh index 1039e0eb..a5e3be2a 100755 --- a/www/publish.sh +++ b/www/publish.sh @@ -1,4 +1,19 @@ #!/bin/bash +# +# Copyright (C) 2017 Alyssa Rosenzweig . echo $1 FILE=${1%.md} @@ -29,4 +44,5 @@ TOC=$(grep -q "^x-toc-enable: true$" temp.md && echo "--toc --toc-depth=2") SMART=$(pandoc -v | grep -q '2\.0' || echo "--smart") # chuck through pandoc -pandoc $TOC $SMART temp.md -s --css /global.css -T Libreboot --template template.html --metadata return="$RETURN"> $FILE.html +pandoc $TOC $SMART temp.md -s --css /global.css -T Libreboot \ + --template template.html --metadata return="$RETURN"> $FILE.html -- cgit v1.2.3-70-g09d2