From 3e384f393db4c46e4ae30e4ccb67e1022bbc2251 Mon Sep 17 00:00:00 2001 From: Henk Verlinde Date: Thu, 20 Jan 2022 18:00:31 +0100 Subject: [PATCH] feat: add manual multi level default section menu --- config/_default/params.toml | 5 ++- layouts/partials/sidebar/docs-menu.html | 42 ++++++++++++++++++++----- 2 files changed, 36 insertions(+), 11 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index d1708ca..4cde9cb 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -92,7 +92,6 @@ mainSections = ["docs"] docsVersioning = false [menu] - [menu.section] - auto = false - collapsibleSidebar = false + auto = true + collapsibleSidebar = true diff --git a/layouts/partials/sidebar/docs-menu.html b/layouts/partials/sidebar/docs-menu.html index 2d73be4..299b0ef 100644 --- a/layouts/partials/sidebar/docs-menu.html +++ b/layouts/partials/sidebar/docs-menu.html @@ -125,15 +125,41 @@ {{ $currentPage := . -}} {{ range .Site.Menus.docs -}} -

{{ .Name }}

+

{{ .Name }}

{{ if .HasChildren -}} - + {{ end -}} {{ end -}} {{ end -}}