From c08756a45fe09d606c8d20b3642e8c85a3c45ba2 Mon Sep 17 00:00:00 2001 From: Paul Duncan <pabs@pablotron.org> Date: Mon, 18 Oct 2021 23:40:59 -0400 Subject: hugo-pt2021: add toc to single article style --- themes/hugo-pt2021/layouts/articles/single.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'themes/hugo-pt2021') 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 --> -- cgit v1.2.3