-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Is your feature request related to a problem? Please describe.
A site might have multiple collections, each with many top-level pages. That could make the navigation menu longer than the page, requiring the user to scroll the navigation bar to see the links in some collections.
Moreover, two collections on the same site could use the same top-level page titles. Users browsing one of the collections might then be confused or distracted by the display of the navigation links to the other collection.
Describe the solution you'd like
Add a configuration option to fold individual collections. The navigation links to the top-level pages of a folded collection would be shown only when it is manually unfolded (by clicking on the v
next to its name) or when some page in the collection is active.
Describe alternatives you've considered
A similar effect could be obtained by adding a new top-level page to a collection, and making it the parent of all the previous top-level pages in that collection. But that would have several disadvantages:
- The extra page would clutter the menu.
- Changing a collection to fold its navigation this way would require changing the front matter of all its existing top-level pages.
- Adding the extra page would require removing existing grandchildren (due to the current limitation on navigation levels).
Additional context
The first screenshot below shows the theme docs with four collections, the first three of which are folded:
When a page in a collection is active, the navigation for that collection appears: