diff options
Diffstat (limited to 'www/publish.sh')
-rwxr-xr-x | www/publish.sh | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/www/publish.sh b/www/publish.sh index 55b6660a..606c1fc9 100755 --- a/www/publish.sh +++ b/www/publish.sh @@ -24,29 +24,33 @@ FILE=${1%.md} cat $1 > temp.md -OPTS= +OPTS="-T Libreboot" if [ "${FILE}" != "./index" ]; then - if [[ $FILE == *index ]] + if [[ $FILE == *suppliers ]] then - DEST="../" + RETURN="" else - DEST="./" - fi + if [[ $FILE == *index ]] + then + DEST="../" + else + DEST="./" + fi - RETURN="<a href='$DEST'>Back to previous index</a>" - OPTS="--css /headerleft.css -T Libreboot" + RETURN="<strong><a href='/git.html#editing-the-website-and-documentation-wiki-style'>Edit this page</a></strong> -- <a href='$DEST'>Back to previous index</a>" + OPTS="-T Libreboot" + fi +else + OPTS="--css /headercenter.css" fi +if [[ $FILE = *suppliers ]]; then + printf "\n<strong><a href=\"/git.html#editing-the-website-and-documentation-wiki-style\">Edit this page</a></strong> -- <a href=\"../\">Back to previous page</a>\n" >> temp.md +fi if [ "${FILE}" != "./docs/fdl-1.3" ] && [ "${FILE}" != "./conduct" ]; then - echo "" >> temp.md - printf "[License](/docs/fdl-1.3.md) --\n" >> temp.md - printf "[Template](/license.md) --\n" >> temp.md - printf "[Authors](/contrib.md) --\n" >> temp.md - printf "[Conduct Guidelines](/conduct.md) --\n" >> temp.md - printf "[Management Guidelines](/management.md) --\n" >> temp.md - printf "[Peers Community](https://peers.community/) \n" >> temp.md + cat footer.md >> temp.md fi # change out .md -> .html @@ -65,3 +69,6 @@ pandoc $TOC $SMART temp.md -s --css /global.css $OPTS \ # additionally, produce bare file for RSS pandoc $1 > $FILE.bare.html + +# generate section title anchors as [link] +sed $FILE.html -i -e 's_^<h\([123]\) id="\(.*\)">\(.*\)</h\1>_<div class="h"><h\1 id="\2">\3</h\1><a aria-hidden="true" href="#\2">[link]</a></div>_' |