diff --git a/bin/template.html b/bin/template.html index e3d570ee4..881f3f2e3 100644 --- a/bin/template.html +++ b/bin/template.html @@ -54,7 +54,13 @@ $endif$ $endif$ $if(toc)$ $endif$ $body$ diff --git a/bin/update_html b/bin/update_html index 8ba13778a..587ed6179 100755 --- a/bin/update_html +++ b/bin/update_html @@ -93,18 +93,18 @@ function render_md_html { html="$2" relroot="$( dirname $md | sed -E 's/^.\///' | sed -E 's/[^/]+/../g' )" - # Look for `toc: true` in metadata (first ten lines of file) - if head -n 10 "$md" | grep --quiet 'toc: true' ; then - toc='--table-of-contents' + # Look for `show-toc: true` in metadata (first ten lines of file) + if head -n 10 "$md" | grep --quiet 'show-toc: true' ; then + tocflag='--table-of-contents' else - toc='' + tocflag='' fi pandoc \ --from=markdown \ --to=html5 \ --standalone \ - $toc \ + $tocflag \ --template="$template" \ --variable="lang:en" \ --variable="rel-root:$relroot" \ diff --git a/doc/gf-refman.md b/doc/gf-refman.md index 0462cf185..3ae3eb866 100644 --- a/doc/gf-refman.md +++ b/doc/gf-refman.md @@ -2,7 +2,7 @@ title: GF Language Reference Manual author: Aarne Ranta, Krasimir Angelov date: June 2014, GF 3.6 -toc: true +show-toc: true --- This document is a reference manual to the GF programming language. GF,