diff --git a/config/_default/params.toml b/config/_default/params.toml index dcbc7bd..d1708ca 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -74,6 +74,10 @@ docsRepoBranch = "master" editPage = false lastMod = false + +mainSections = ["docs"] + + [options] lazySizes = true clipBoard = true @@ -84,6 +88,11 @@ lastMod = false breadCrumb = true highLight = true kaTex = false - collapsibleSidebar = true multilingualMode = false docsVersioning = false + +[menu] + + [menu.section] + auto = false + collapsibleSidebar = false diff --git a/layouts/partials/sidebar/docs-menu.html b/layouts/partials/sidebar/docs-menu.html index 316de10..2d73be4 100644 --- a/layouts/partials/sidebar/docs-menu.html +++ b/layouts/partials/sidebar/docs-menu.html @@ -1,4 +1,65 @@ -{{ if .Site.Params.options.collapsibleSidebar -}} +{{ if and .Site.Params.menu.section.auto .Site.Params.menu.section.collapsibleSidebar -}} + +
+{{ else if and .Site.Params.menu.section.auto (not .Site.Params.menu.section.collapsibleSidebar) -}} + + +{{ else if and (not .Site.Params.menu.section.auto) .Site.Params.menu.section.collapsibleSidebar -}} + -{{ else -}} +{{ else if and (not .Site.Params.menu.section.auto) (not .Site.Params.menu.section.collapsibleSidebar) -}} + {{ $currentPage := . -}} {{ range .Site.Menus.docs -}}