diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index d963e0e83..bd3ff3ac9 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -76,6 +76,7 @@ viewer = true # Image Viewer # fixed = true # archives = true # Enable archives widget # taxonomiesToggle = false # Disable taxonomy toggle + # taxonomiesToggleArchives = false # Don't show the archives on taxonomies toggle widget. # categories = true # Enable categories widget # tags = true # Enable tags widget # series = true # Enable series widget diff --git a/exampleSite/content/docs/configuration/site-params/index.md b/exampleSite/content/docs/configuration/site-params/index.md index a14f144bd..a6b1b55c8 100644 --- a/exampleSite/content/docs/configuration/site-params/index.md +++ b/exampleSite/content/docs/configuration/site-params/index.md @@ -137,6 +137,7 @@ The site parameters are located in `config/_default/params.toml` by default. | `sidebar` | Object | - | | `sidebar.fixed` | Boolean | `false` | Fix default sidebar. | `sidebar.taxonomiesToggle` | Boolean | `true` | Show the taxonomies toggle widget on the sidebar. +| `sidebar.taxonomiesToggleArchives` | Boolean | `true` | Show/Hide the archives from the taxonomies toggle. | `sidebar.series` | Boolean | `false` | Show the series widget on the sidebar. | `sidebar.categories` | Boolean | `false` | Show the categories widget on the sidebar. | `sidebar.tags` | Boolean | `false` | Show the tags widget on the sidebar. diff --git a/exampleSite/content/docs/configuration/site-params/index.zh-hans.md b/exampleSite/content/docs/configuration/site-params/index.zh-hans.md index b005d5dfb..3fe069e3a 100644 --- a/exampleSite/content/docs/configuration/site-params/index.zh-hans.md +++ b/exampleSite/content/docs/configuration/site-params/index.zh-hans.md @@ -140,6 +140,7 @@ authors = ["RazonYang"] | `sidebar` | Object | - | | `sidebar.fixed` | Boolean | `false` | 固定默认侧边栏。 | `sidebar.taxonomiesToggle` | Boolean | `true` | Show the taxonomies toggle widget on the sidebar. +| `sidebar.taxonomiesToggleArchives` | Boolean | `true` | Show/Hide the archives from the taxonomies toggle. | `sidebar.series` | Boolean | `false` | Show the series widget on the sidebar. | `sidebar.categories` | Boolean | `false` | Show the categories widget on the sidebar. | `sidebar.tags` | Boolean | `false` | Show the tags widget on the sidebar. diff --git a/exampleSite/content/docs/configuration/site-params/index.zh-hant.md b/exampleSite/content/docs/configuration/site-params/index.zh-hant.md index 35f06b0ac..7248f955b 100644 --- a/exampleSite/content/docs/configuration/site-params/index.zh-hant.md +++ b/exampleSite/content/docs/configuration/site-params/index.zh-hant.md @@ -140,6 +140,7 @@ authors = ["RazonYang"] | `sidebar` | Object | - | | `sidebar.fixed` | Boolean | `false` | 固定默認側邊欄。 | `sidebar.taxonomiesToggle` | Boolean | `true` | Show the taxonomies toggle widget on the sidebar. +| `sidebar.taxonomiesToggleArchives` | Boolean | `true` | Show/Hide the archives from the taxonomies toggle. | `sidebar.series` | Boolean | `false` | Show the series widget on the sidebar. | `sidebar.categories` | Boolean | `false` | Show the categories widget on the sidebar. | `sidebar.tags` | Boolean | `false` | Show the tags widget on the sidebar. diff --git a/layouts/partials/sidebar/taxonomies-toggle.html b/layouts/partials/sidebar/taxonomies-toggle.html index ed050292f..923a4c78f 100644 --- a/layouts/partials/sidebar/taxonomies-toggle.html +++ b/layouts/partials/sidebar/taxonomies-toggle.html @@ -1,5 +1,6 @@ {{- $collapsed := default false .Site.Params.sidebar.collapsed }} {{- if default true .Site.Params.sidebar.taxonomiesToggle }} +{{- $archives := default true $.Site.Params.sidebar.taxonomiesToggleArchives }}
@@ -32,12 +33,14 @@ {{- end }} {{- end }} {{- end }} + {{- if $archives }} + {{- end }}
@@ -76,9 +79,11 @@ {{- end }} {{- end }} {{- end }} + {{- if $archives }}
{{- partial "sidebar/archive-items" . }}
+ {{- end }}