Table of Contents
This commit is contained in:
parent
f6769864be
commit
f9cd1790d6
3 changed files with 22 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
|||
{{ partial "post-language-switcher.html" . }}
|
||||
</header>
|
||||
</div>
|
||||
{{ partial "toc.html" .}}
|
||||
<div class="content e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
|
9
layouts/partials/toc.html
Normal file
9
layouts/partials/toc.html
Normal 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 }}
|
Loading…
Add table
Add a link
Reference in a new issue