H1
TOC is always enabled on news pages
TOC=$(grep -q “^x-toc-enable: true$” “$TMPFILE” && \ printf ‘%s\n’ “–toc –toc-depth=4”) || TOC=“”
TODO: make toc depth configurable in site.cfg
if [ -f “${FILE%/*}/MANIFEST” ]; then TOC=“–toc –toc-depth=4” fi
work around heterogenous pandoc versions
SMART=$(pandoc -v | grep -q ‘2.0’ || \ printf ‘%s\n’ “-f markdown+smart -t html”) || SMART=“”
PDIR=“$(getConfigValue ”${STRINGSCFGPATH}“ "PDIR”)"
printf “Generating ‘%s.html’\n” “${FILE}”
chuck through pandoc
#
$CSS must not be quoted, otherwise pandoc interprets ‘–css /headercenter.css’
as one argument, when it is actually two.
Same for $TITLE
pandoc -V lang=${PAGELANGUAGE} -V dir=${PDIR} $TOC $SMART “$TMPFILE” \ -s ${CSS} ${CSSOVERRIDE} ${TITLE} \ –template ${TEMPLATE} –metadata return=“” > “$FILE.html”
generate section title anchors as [li
TOC is always enabled on news pages
TOC=$(grep -q “^x-toc-enable: true$” “$TMPFILE” && \ printf ‘%s\n’ “–toc –toc-depth=4”) || TOC=“”
TODO: make toc depth configurable in site.cfg
if [ -f “${FILE%/*}/MANIFEST” ]; then TOC=“–toc –toc-depth=4” fi
work around heterogenous pandoc versions
SMART=$(pandoc -v | grep -q ‘2.0’ || \ printf ‘%s\n’ “-f markdown+smart -t html”) || SMART=“”
PDIR=“$(getConfigValue ”${STRINGSCFGPATH}“ "PDIR”)"
printf “Generating ‘%s.html’\n” “${FILE}”
chuck through pandoc
#
$CSS must not be quoted, otherwise pandoc interprets ‘–css /headercenter.css’
as one argument, when it is actually two.
Same for $TITLE
pandoc -V lang=${PAGELANGUAGE} -V dir=${PDIR} $TOC $SMART “$TMPFILE” \ -s ${CSS} ${CSSOVERRIDE} ${TITLE} \ –template ${TEMPLATE} –metadata return=“” > “$FILE.html”
generate section title anchors as [li TOC is always enabled on news pages
TOC=$(grep -q “^x-toc-enable: true$” “$TMPFILE” && \ printf ‘%s\n’ “–toc –toc-depth=4”) || TOC=“”
TODO: make toc depth configurable in site.cfg
if [ -f “${FILE%/*}/MANIFEST” ]; then TOC=“–toc –toc-depth=4” fi
work around heterogenous pandoc versions
SMART=$(pandoc -v | grep -q ‘2.0’ || \ printf ‘%s\n’ “-f markdown+smart -t html”) || SMART=“”
PDIR=“$(getConfigValue ”${STRINGSCFGPATH}“ "PDIR”)"
printf “Generating ‘%s.html’\n” “${FILE}”
chuck through pandoc
#
$CSS must not be quoted, otherwise pandoc interprets ‘–css /headercenter.css’
as one argument, when it is actually two.
Same for $TITLE
pandoc -V lang=${PAGELANGUAGE} -V dir=${PDIR} $TOC $SMART “$TMPFILE” \ -s ${CSS} ${CSSOVERRIDE} ${TITLE} \ –template ${TEMPLATE} –metadata return=“” > “$FILE.html”