summaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authoramzrk22020-06-04 16:10:11 +0800
committeramzrk22020-06-04 16:10:11 +0800
commit8cd169db2d0d4306434894e7eeaa41ef906515f2 (patch)
treea9f592adc8c3630b3d3d93ed25ad615a41afc754 /layouts
parent98cd7b30728bd5d98abbfea10000038604a59156 (diff)
downloadhugo-theme-fuji-8cd169db2d0d4306434894e7eeaa41ef906515f2.tar.gz
hugo-theme-fuji-8cd169db2d0d4306434894e7eeaa41ef906515f2.tar.bz2
hugo-theme-fuji-8cd169db2d0d4306434894e7eeaa41ef906515f2.zip
Allow disable toc globally
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/sidebar.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 8e902c1..7ead0e2 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -1,6 +1,6 @@
<aside class="col-12 col-md-3 float-left sidebar">
<!-- in-post toc -->
- {{ if in .Site.Params.mainSections .Type }}
+ {{ if and (in .Site.Params.mainSections .Type) (and (.Site.Params.showToc) (ne .Params.noToc true)) }}
<div class="sidebar-item sidebar-toc">
<h3>{{ i18n "sidebarToc" }}</h3>
{{ .TableOfContents }}