diff options
author | Paul Duncan <pabs@pablotron.org> | 2021-10-18 23:40:59 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2021-10-18 23:40:59 -0400 |
commit | c08756a45fe09d606c8d20b3642e8c85a3c45ba2 (patch) | |
tree | 3c72f4e878c69d35ec80602901ba0cc6f6c0a40f | |
parent | 94b76900e9c2c381dd418152182f851b1693b295 (diff) | |
download | pablotron.org-c08756a45fe09d606c8d20b3642e8c85a3c45ba2.tar.bz2 pablotron.org-c08756a45fe09d606c8d20b3642e8c85a3c45ba2.zip |
hugo-pt2021: add toc to single article style
-rw-r--r-- | themes/hugo-pt2021/layouts/articles/single.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/themes/hugo-pt2021/layouts/articles/single.html b/themes/hugo-pt2021/layouts/articles/single.html index 76d5c00..5abab69 100644 --- a/themes/hugo-pt2021/layouts/articles/single.html +++ b/themes/hugo-pt2021/layouts/articles/single.html @@ -15,6 +15,18 @@ {{- end -}} <div class='content'> + {{- if .Params.toc -}} + <h2 + class='subtitle' + title='Table of Contents' + aria-label='Table of Contents' + > + Table of Contents + </h2> + + {{- .TableOfContents -}} + {{- end -}} + {{- .Content -}} </div><!-- content --> </div><!-- section --> |