summaryrefslogtreecommitdiffstats
path: root/layouts/partials/sidebar.html
diff options
context:
space:
mode:
authoramzrk22020-04-21 10:44:00 +0800
committeramzrk22020-04-21 10:44:00 +0800
commit94193538e3f10063bb31590108ea497d1a28084b (patch)
treecd9f25215e8cfe26a81a44c4a7eb4fa411c33280 /layouts/partials/sidebar.html
parentd7fb3a9065eab673024c1ef5d0e6fd18b8a5d933 (diff)
downloadhugo-theme-fuji-94193538e3f10063bb31590108ea497d1a28084b.tar.gz
hugo-theme-fuji-94193538e3f10063bb31590108ea497d1a28084b.tar.bz2
hugo-theme-fuji-94193538e3f10063bb31590108ea497d1a28084b.zip
Add TOC in post pages
Diffstat (limited to 'layouts/partials/sidebar.html')
-rw-r--r--layouts/partials/sidebar.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 8b84596..0c3770d 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -1,3 +1,9 @@
+{{ if in .Site.Params.mainSections .Type }}
+<div id="widget-toc">
+ <h5>{{ i18n "sidebarToc" }}</h5>
+ {{.TableOfContents}}
+</div>
+{{ end }}
<div id="widget-pages">
<h5>{{ i18n "sidebarPages" }}</h5>
<ul>