-
Notifications
You must be signed in to change notification settings - Fork 954
Open
Labels
Description
Environment
- Version of Docsy you are using: 0.13.0
- How are you using Docsy? As a:
- Hugo module
- NPM module
- Git submodule
- Other:
- Version of Hugo you are using (output of
hugo version): hugo v0.153.3-179034abbb2f31793c553a311177e6d742118030+extended linux/amd64 BuildDate=2025-12-26T15:33:04Z VendorInfo=gohugoio - OS:
- Linux
- macOS
- Windows
- Other:
Problem
We have been using the docs type on our website, and the sidebar was defaulting to .Site.Home as root on all sections and subpages. After upgrading to 0.13.0 the sidebar root defaults to .FirstSection and it is not possible to get it to default to .Site.Home anymore without modifying the layout files.
I believe that the culprits are those lines:
$sidebarRootdefaults to.FirstSectioninsidebar.html:docsy/layouts/_partials/sidebar.html
Line 13 in bbf68d4
{{ $sidebarRoot := .FirstSection -}} - The old default for
$navRootinsidebar-tree.htmlfor thedocstype which was set to.Site.Homeis overriden by$sidebarRoot, which is always set because of the default insidebar.html:docsy/layouts/_partials/sidebar-tree.html
Lines 49 to 52 in bbf68d4
{{ $navRoot := cond (and (ne .Params.toc_root true) (eq .Site.Home.Type "docs")) .Site.Home .FirstSection -}} {{ if $sidebarRoot -}} {{ $navRoot = $sidebarRoot -}} {{ end -}}
tcrouch