diff options
Diffstat (limited to 'layouts/partials/toc.html')
| -rw-r--r-- | layouts/partials/toc.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html new file mode 100644 index 0000000..4db9a6f --- /dev/null +++ b/layouts/partials/toc.html @@ -0,0 +1,7 @@ +{{- $headings := findRE `<h[23][ >]` .Content -}} +{{- if gt (len $headings) 4 }} + <section class="table-of-contents" aria-labelledby="contents-title"> + <h2 id="contents-title">CONTENTS</h2> + {{ .TableOfContents }} + </section> +{{- end -}} |
