Repository navigation
Add sidebar tree lines, sticky breadcrumbs, and a "Collapse all" button - #2302
Merged
Merged
Conversation
- Show a sticky breadcrumb trail (docs section, then the sidebar groups leading to the page) above each page. It renders outside [vp-content] so site search doesn't index it as page text. - Replace the theme's sidebar item: collapsible groups get a chevron toggle separate from their link, nesting levels draw guide lines, and the current page and its parent groups are highlighted. Groups opened automatically close again on navigation; groups the reader opens stay open. - Add a sticky "Collapse all" button to sidebars that have collapsible groups. - Make the English book's sidebar groups collapsible. - Drop the duplicate README child from the contributor book and language guide sidebars (en, and zh-CN contributor book), so the group row is the only link to the README.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The book's sidebar is one long list, and a page doesn't say which book or section it's in. Taking a cue from Ghostty's docs, the sidebar now draws the tree and marks the path to the current page, and a breadcrumb bar under the navbar shows the same path.
Sidebar
Breadcrumbs
The bar shows a trail like
The Nushell Book > Programming in Nu > Modules > Using Modules. The first crumb is the page's navbar section and the rest come from the sidebar. Pages outside the sidebar, like command reference pages and blog posts, get the section and the page title.The bar stays under the navbar while you scroll and stays on one line. When space runs out, earlier crumbs shrink to an ellipsis first. Heading jumps land below the bar, and a crumb that repeats the one before it, like Cookbook > Cookbook, shows once.
User-facing changes (Release notes)
The Nushell Book > Programming in Nu > Modules > Using Modules, that stays in view while you scroll.Guide lines and foldable groups in the docs sidebar
The docs sidebar draws a guide line for each nesting level and marks the path to the current page in green. In the English Nushell Book, sidebar groups fold with a chevron. The group holding the current page opens when you reach it and closes when you leave, while groups you open yourself stay open. A "Collapse all" button at the top of the sidebar closes every group.
Additional notes
To try it, run
npm run dev, open http://localhost:8080/book/modules/using_modules.html, scroll down, and click a heading in the sidebar.