Skip to content

feat(html): add fold.headers for sidebar header nav#3121

Closed
wyf027 wants to merge 1 commit into
rust-lang:masterfrom
wyf027:feat/fold-sidebar-headers-3054
Closed

feat(html): add fold.headers for sidebar header nav#3121
wyf027 wants to merge 1 commit into
rust-lang:masterfrom
wyf027:feat/fold-sidebar-headers-3054

Conversation

@wyf027

@wyf027 wyf027 commented May 17, 2026

Copy link
Copy Markdown

Summary

  • Adds output.html.fold.headers (default false) to control folding of the page header list shown by sidebar-header-nav.
  • When headers = true and enable = true, header items use the same level semantics as chapter folding.
  • Extends the heading-nav-folded GUI test book to verify nested headers start collapsed.

Fixes #3054

Test plan

  • cargo test -p mdbook-core
  • GUI: heading-nav-folded.goml (requires browser-ui-test in CI)

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 17, 2026
When output.html.fold.headers is true and folding is enabled, apply the
same fold level settings to the on-page header list in the sidebar.
@ehuss ehuss closed this May 23, 2026
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label May 23, 2026
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.

Collapse/fold sidebar-header-nav

3 participants