diff options
Diffstat (limited to 'www/publish.sh')
-rwxr-xr-x | www/publish.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/www/publish.sh b/www/publish.sh index 098df29c..e75ec332 100755 --- a/www/publish.sh +++ b/www/publish.sh @@ -35,13 +35,15 @@ if [ "${FILE}" != "./index" ]; then fi RETURN="<a href='$DEST'>Back to previous index</a>" - OPTS="--css /headerleft.css -T Libreboot" + OPTS="-T Libreboot" +else + OPTS="--css /headercenter.css" fi -echo "" >> temp.md -printf "[License](/license.md) --\n" >> temp.md -printf "[Information about the Libreboot authors](/contrib.md) --\n" >> temp.md -printf "[Please read our guidelines for good conduct](/conduct.md)\n" >> temp.md + +if [ "${FILE}" != "./docs/fdl-1.3" ] && [ "${FILE}" != "./conduct" ]; then + cat footer.md >> temp.md +fi # change out .md -> .html sed temp.md -i -e 's/\.md\(#[a-z\-]*\)*)/.html\1)/g' @@ -59,3 +61,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>_' |