Table of Contents

This commit is contained in:
SandaruKasa 2023-07-04 22:29:38 +03:00
parent f6769864be
commit f9cd1790d6
No known key found for this signature in database
GPG key ID: F33E2EE578F57268
3 changed files with 22 additions and 0 deletions

View file

@ -15,6 +15,7 @@
{{ partial "post-language-switcher.html" . }}
</header>
</div>
{{ partial "toc.html" .}}
<div class="content e-content">
{{ .Content }}
</div>

View file

@ -0,0 +1,9 @@
{{ $toc := and ($.Site.Params.toc) (ge .WordCount $.Site.Params.tocWordCount) }}
{{ if isset .Params "toc" }}
{{ $toc = .Params.toc }}
{{ end }}
{{ if $toc }}
{{ .TableOfContents }}
{{ end }}