docsy
docsy copied to clipboard
Display all Sections that are descendants of Page
By default Hugo only return the immediate nested Section of a Page declared by _index.md
, forcing users to add empty files to walk the directory tree to nested docs.
This partial and update to $pages_tmp
enables the sidebar to discover and display all docs in a tree, flattening lower levels into their closest Parent Section.
This also matches the behaviour in section-index.html
This shouldn't be necessary given the Hugo docs on Nested Sections but is practice I couldn't get deeply nested sections to work with Docsy.
The addition of RegularPagesRecursive
also seems to indicate that nested sections/pages do not work as expected
Thanks for this - before review, have you also asked about this on the Hugo forum? If Hugo is supposed to support deeply nested sections but they're not actually working it may be a broader Hugo issue/there may be broader fixes in the works.