aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2021-10-18 23:40:59 -0400
committerPaul Duncan <pabs@pablotron.org>2021-10-18 23:40:59 -0400
commitc08756a45fe09d606c8d20b3642e8c85a3c45ba2 (patch)
tree3c72f4e878c69d35ec80602901ba0cc6f6c0a40f /themes
parent94b76900e9c2c381dd418152182f851b1693b295 (diff)
downloadpablotron.org-c08756a45fe09d606c8d20b3642e8c85a3c45ba2.tar.bz2
pablotron.org-c08756a45fe09d606c8d20b3642e8c85a3c45ba2.zip
hugo-pt2021: add toc to single article style
Diffstat (limited to 'themes')
-rw-r--r--themes/hugo-pt2021/layouts/articles/single.html12
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 -->