about summary refs log tree commit diff
path: root/layouts/_default
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2021-08-15 13:46:47 -0700
committerFranck Cuny <franck@fcuny.net>2021-08-15 13:46:47 -0700
commit474c50db3454dbe59a180e31f9b9e365ea76eaa5 (patch)
treeb1df5da790f3cc376c47ae70bb899a7739d6751a /layouts/_default
parentCSS: use a class for the menu (diff)
downloadfcuny.net-474c50db3454dbe59a180e31f9b9e365ea76eaa5.tar.gz
CSS: support table of content
If an entry has the parameter `#+toc` set to `t`, we will enable the
table of content in the page.
Diffstat (limited to 'layouts/_default')
-rw-r--r--layouts/_default/single.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 356f344..b4c5443 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -29,6 +29,13 @@
   {{ end }}
 </div>
 
+{{ if .Params.toc }}
+<div class="toc">
+  <strong>Table of Contents</strong>
+  {{ .TableOfContents }}
+</div>
+{{ end }}
+
 {{ .Content }}
 
 {{ end }}