toc only when explicitly enabled

This commit is contained in:
Gabriele Musco 2021-12-23 00:46:39 +01:00
parent 6c16f5afa9
commit 84c245d47c
No known key found for this signature in database
GPG Key ID: 0587A5D65B5DC99E
1 changed files with 6 additions and 4 deletions

View File

@ -11,10 +11,12 @@
{{ if .Params.Image }} {{ if .Params.Image }}
<img src="{{ .Params.Image }}" alt="" /> <img src="{{ .Params.Image }}" alt="" />
{{ end }} {{ end }}
<div class="articleToc"> {{ if (.Params.toc | default false) }}
{{ .TableOfContents }} <div class="articleToc">
<hr /> {{ .TableOfContents }}
</div> <hr />
</div>
{{ end }}
<div>{{ .Content }}</div> <div>{{ .Content }}</div>
</article> </article>
{{ if .Params.tags }} {{ if .Params.tags }}