diff --git a/config/_default/params.toml b/config/_default/params.toml index 076c8aa..88514bd 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -90,5 +90,5 @@ lastMod = false [menu] [menu.section] auto = true - collapsibleSidebar = true - mainSections = ["docs", "tutorial"] + collapsibleSidebar = false + mainSections = ["docs"] diff --git a/layouts/partials/sidebar/auto-default-menu.html b/layouts/partials/sidebar/auto-default-menu.html index 19408ec..9a0c9ea 100644 --- a/layouts/partials/sidebar/auto-default-menu.html +++ b/layouts/partials/sidebar/auto-default-menu.html @@ -1 +1,36 @@ - \ No newline at end of file + +{{ $currentPage := . -}} +{{ range (where .Site.Sections "Section" "in" site.Params.menu.section.mainSections) }} + {{ range .Sections.Reverse }} + {{ $active := in $currentPage.RelPermalink .RelPermalink }} +

{{ .Title }}

+ + {{ end }} +{{ end }} \ No newline at end of file