diff options
author | Leah Rowe <info@minifree.org> | 2017-04-04 00:39:08 +0200 |
---|---|---|
committer | Gogs <gogitservice@gmail.com> | 2017-04-04 00:39:08 +0200 |
commit | c7908aa7fe8e7cc9b00409bd7c93c58c0e6d1261 (patch) | |
tree | 9c76f68bc63b7a9fed0c22e4ffdcc2f14be0ee69 /www/publish.sh | |
parent | 3d08f096b8ff9857fc066e15d318dcf145807343 (diff) | |
parent | cb8d13228f7dcb58f7e891dfd57493209ecc5518 (diff) | |
download | librebootfr-c7908aa7fe8e7cc9b00409bd7c93c58c0e6d1261.tar.gz librebootfr-c7908aa7fe8e7cc9b00409bd7c93c58c0e6d1261.zip |
Merge branch 'www/template' of vimuser/libreboot into master
Diffstat (limited to 'www/publish.sh')
-rwxr-xr-x | www/publish.sh | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/www/publish.sh b/www/publish.sh index dadb83e0..f1858fe1 100755 --- a/www/publish.sh +++ b/www/publish.sh @@ -3,22 +3,13 @@ echo $1 FILE=${1%.md} -# get title block -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="<p><a href='/index.md'>Go back to homepage</a></p>" fi -# read rest of file -tail -n +5 $FILE.md >> temp.md - -# add license notice where applicable -# TODO: make this less intrusive -#if [[ ${FILE} != "docs*" ]] ; then -# cat license.md >> temp.md -#fi +cat $1 > temp.md +echo "[License](license.md)" >> temp.md # change out .md -> .html sed temp.md -i -e 's/\.md\(#[a-z\-]*\)*)/.html\1)/g' @@ -30,4 +21,5 @@ 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 |