hugo-theme-even/layouts/partials/post/toc.html
olOwOlo 1bb6eea8a8
feat: allow set something for a single content
* Now, you can open or close toc, copyright, reward and mathjax for a single content.
* Also change the default global settings: autoCollapseToc = true -> false; mathjax = true -> false
2017-12-06 20:34:22 +08:00

9 lines
No EOL
472 B
HTML

{{ 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 }}