summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.toml5
-rw-r--r--layouts/articles/single.html4
2 files changed, 9 insertions, 0 deletions
diff --git a/config.toml b/config.toml
index 9dc581f..a7dc594 100644
--- a/config.toml
+++ b/config.toml
@@ -4,3 +4,8 @@ disableKinds = ["taxonomy", "term", "RSS"]
[taxonomies]
category = "categories"
tag = "tags"
+[markup]
+ [markup.tableOfContents]
+ endLevel = 6
+ ordered = false
+ startLevel = 4
diff --git a/layouts/articles/single.html b/layouts/articles/single.html
index 62a23d3..7df87e4 100644
--- a/layouts/articles/single.html
+++ b/layouts/articles/single.html
@@ -27,6 +27,10 @@
</header>
<main>
+ <details>
+ <summary>Table of contents</summary>
+ {{ .TableOfContents }}
+ </details>
{{ .Content }}
{{ partial "footer.html" . }}
</main>