mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-12 16:19:45 +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) }}
|
{{ if and .Site.Params.toc (ne .Params.toc false) }}
|
||||||
<div class="post-toc" id="post-toc">
|
<div class="post-toc" id="post-toc">
|
||||||
<h2 class="post-toc-title">{{ .Site.Data.even.default.posts.toc }}</h2>
|
<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 }}">
|
{{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }}
|
||||||
{{.TableOfContents}}
|
<div class="post-toc-content{{ if not (or .Params.autoCollapseToc (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false))) }} always-active{{ end }}">
|
||||||
|
{{.TableOfContents}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in a new issue