mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-08 22:49:44 +00:00
fix: compatible with config.toml file without the autoCollapseToc
parameter
This commit is contained in:
parent
c6a71c268b
commit
8c07810484
1 changed files with 3 additions and 2 deletions
|
@ -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 }}
|
Loading…
Reference in a new issue