aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/post/toc.html
blob: e5985c9f8004fbe352b82342f6ab295ac655a90f (plain)
1
2
3
4
5
6
7
8
9
{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) }}
<div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">{{ .Site.Data.even.default.posts.toc }}</h2>
  {{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default false }}
  <div class="post-toc-content{{ if not (or .Params.autoCollapseToc (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false))) }} always-active{{ end }}">
    {{.TableOfContents}}
  </div>
</div>
{{- end }}