diff options
Diffstat (limited to 'layouts/partials/post')
-rw-r--r-- | layouts/partials/post/toc.html | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/layouts/partials/post/toc.html b/layouts/partials/post/toc.html index 1cb7804..35e6da6 100644 --- a/layouts/partials/post/toc.html +++ b/layouts/partials/post/toc.html @@ -1,8 +1,9 @@ {{ if 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> - <div class="post-toc-content{{ if or .Params.autoCollapseToc (and .Site.Params.autoCollapseToc (ne .Params.autoCollapseToc false)) | not }} always-active{{ end }}"> - {{.TableOfContents}} + {{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }} + <div class="post-toc-content{{ if not (or .Params.autoCollapseToc (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false))) }} always-active{{ end }}"> + {{.TableOfContents}} </div> </div> {{- end }}
\ No newline at end of file |