summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--assets/sass/_sidebar.scss1
-rw-r--r--i18n/en.toml3
-rw-r--r--i18n/ja.toml3
-rw-r--r--i18n/zh-hans.toml3
-rw-r--r--i18n/zh-hant.toml3
-rw-r--r--layouts/partials/sidebar.html6
6 files changed, 19 insertions, 0 deletions
diff --git a/assets/sass/_sidebar.scss b/assets/sass/_sidebar.scss
index 640494d..9010af5 100644
--- a/assets/sass/_sidebar.scss
+++ b/assets/sass/_sidebar.scss
@@ -17,6 +17,7 @@
@include link-secondary();
+ #widget-toc,
#widget-pages,
#widget-tags,
#widget-links {
diff --git a/i18n/en.toml b/i18n/en.toml
index bf453c8..02853ac 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -1,3 +1,6 @@
+[sidebarToc]
+ other = "TOC"
+
[sidebarPages]
other = "Pages"
diff --git a/i18n/ja.toml b/i18n/ja.toml
index bb56474..eb283e6 100644
--- a/i18n/ja.toml
+++ b/i18n/ja.toml
@@ -1,3 +1,6 @@
+[sidebarToc]
+ other = "目次"
+
[sidebarPages]
other = "ページ"
diff --git a/i18n/zh-hans.toml b/i18n/zh-hans.toml
index b38a405..56783e4 100644
--- a/i18n/zh-hans.toml
+++ b/i18n/zh-hans.toml
@@ -1,3 +1,6 @@
+[sidebarToc]
+ other = "目录"
+
[sidebarPages]
other = "页面"
diff --git a/i18n/zh-hant.toml b/i18n/zh-hant.toml
index a1a9681..1f2ba0a 100644
--- a/i18n/zh-hant.toml
+++ b/i18n/zh-hant.toml
@@ -1,3 +1,6 @@
+[sidebarToc]
+ other = "目錄"
+
[sidebarPages]
other = "頁面"
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>