diff options
author | Franck Cuny <franck@fcuny.net> | 2021-08-15 13:46:47 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2021-08-15 13:46:47 -0700 |
commit | e2f6f42c089bbea803abb0c57eeaa27c53f47f59 (patch) | |
tree | f34742bcfb80bee70fcba020de24c66f3b6d2571 /users/fcuny/notes/layouts/_default/single.html | |
parent | CSS: use a class for the menu (diff) | |
download | world-e2f6f42c089bbea803abb0c57eeaa27c53f47f59.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 'users/fcuny/notes/layouts/_default/single.html')
-rw-r--r-- | users/fcuny/notes/layouts/_default/single.html | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/users/fcuny/notes/layouts/_default/single.html b/users/fcuny/notes/layouts/_default/single.html index 356f344..b4c5443 100644 --- a/users/fcuny/notes/layouts/_default/single.html +++ b/users/fcuny/notes/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 }} |