From bf3607bdd0ae1ed62b926c675b4ac3d5dd380674 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 3 Apr 2017 12:26:18 -0700 Subject: Use a custom template --- www/publish.sh | 4 ++-- www/template.html | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 www/template.html (limited to 'www') diff --git a/www/publish.sh b/www/publish.sh index dadb83e0..efe3249d 100755 --- a/www/publish.sh +++ b/www/publish.sh @@ -8,7 +8,7 @@ head -n 4 $FILE.md > temp.md # if not homepage, add a link back to the homepage if [ "${FILE}" != "./index" ]; then - printf "[Go back to homepage](/index.md)\n\n" >> temp.md + RETURN="

Go back to homepage

" fi # read rest of file @@ -30,4 +30,4 @@ TOC=$(grep -q "^x-toc-enable: true$" temp.md && echo "--toc") 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 > $FILE.html +pandoc $SMART temp.md -s --css /global.css --section-divs -T Libreboot $TOC --template=template.html --metadata "return=$RETURN" > $FILE.html diff --git a/www/template.html b/www/template.html new file mode 100644 index 00000000..2fc9b28d --- /dev/null +++ b/www/template.html @@ -0,0 +1,67 @@ + + + + + + +$for(author-meta)$ + +$endfor$ +$if(date-meta)$ + +$endif$ +$if(keywords)$ + +$endif$ + $if(title-prefix)$$title-prefix$ – $endif$$pagetitle$ + +$if(quotes)$ + +$endif$ +$if(highlighting-css)$ + +$endif$ +$for(css)$ + +$endfor$ +$if(math)$ + $math$ +$endif$ +$for(header-includes)$ + $header-includes$ +$endfor$ + + +$for(include-before)$ +$include-before$ +$endfor$ +$if(title)$ +
+

$title$

+$if(subtitle)$ +

$subtitle$

+$endif$ +$for(author)$ +

$author$

+$endfor$ +$if(date)$ +

$date$

+$endif$ +
+$endif$ +$if(return)$ +$return$ +$endif$ +$if(toc)$ + +$endif$ +$body$ +$for(include-after)$ +$include-after$ +$endfor$ + + -- cgit v1.2.3-70-g09d2