Merge pull request #231 from sofixa/toc

add the ability to disable table of contents per-page/post
This commit is contained in:
Radek Kozieł 2021-05-12 23:50:33 +02:00 committed by GitHub
commit 3e62106bc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,9 +54,11 @@
<div class="post-content">
{{ if or .Params.Toc $.Site.Params.Toc }}
{{ if ne .Params.Toc false }}
<h2>Table of Contents</h2>
<aside class="table-of-contents">{{ .TableOfContents }}</aside>
{{ end }}
{{ end }}
{{ .Content }}
</div>
{{ if eq .Type $.Site.Params.contentTypeName }}