Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display all Sections that are descendants of Page #1160

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

metafeather
Copy link

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

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`
@metafeather
Copy link
Author

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

@LisaFC
Copy link
Collaborator

LisaFC commented Aug 15, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants