summaryrefslogtreecommitdiffstats
path: root/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/sidebar.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 6847375..1d6ae92 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -33,13 +33,15 @@
</div>
</div>
<!-- in-post toc -->
- {{ if .IsPage }}
- {{ if and (ne .Site.Params.showToc false) (ne .Params.showToc false) }}
+ {{- if .IsPage -}}
+ {{- $pageShowToc := .Params.showToc -}}
+ {{- $siteShowToc := .Site.Params.showToc -}}
+ {{- if or ($pageShowToc) (and (ne $pageShowToc false) (ne $siteShowToc false)) -}}
<div class="sidebar-item sidebar-toc">
<h3>{{ i18n "sidebarToc" }}</h3>
- {{ .TableOfContents }}
+ {{- .TableOfContents -}}
</div>
- {{ end }}
+ {{- end -}}
{{ else }}
{{ with .Site.Params.bgmImageChart }}
<!-- bgm.tv image chart -->