diff options
author | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2017-04-03 12:32:59 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <alyssa@rosenzweig.io> | 2017-04-03 12:32:59 -0700 |
commit | 0b96f7a49f0428d23231403177583316ecee413f (patch) | |
tree | 68e07f48a8c158128e8a967e9513f37023db7bec | |
parent | c563adf717edd2132336bfd1e9ce9e999fd9b0cd (diff) | |
download | librebootfr-0b96f7a49f0428d23231403177583316ecee413f.tar.gz librebootfr-0b96f7a49f0428d23231403177583316ecee413f.zip |
fix publish
-rwxr-xr-x | www/publish.sh | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/www/publish.sh b/www/publish.sh index efe3249d..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 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 --template=template.html --metadata "return=$RETURN" > $FILE.html +pandoc $SMART temp.md -s --css /global.css --section-divs -T Libreboot $TOC \ + --template=template.html --metadata "return=$RETURN" > $FILE.html |