No description
Find a file
Eric Huss 5282083dec Fix heading nav with folded chapters
This fixes an issue when folding is enabled. The folding was not
properly hiding the sub-chapters because it was assuming it could hide
the next list element. However, the heading nav was the next list
element, so the remaining chapters remained visible.

The solution required some deeper changes to how the chapters were
organized in the sidebar. Instead of nested chapters being a list
element *sibling*, the nested chapter's `ol` is now a *child* of its
parent chapter. This makes it much easier to just hide everything
without regard of the exact sibling order.

This required wrapping the chapter title and the toggle chevron inside a
span so that the flex layout could be localized to just those elements,
and allow the following `ol` elements to lay out regularly.

Closes https://github.com/rust-lang/mdBook/issues/2880
2025-10-20 17:31:40 -07:00
.cargo Add an xtask to help with running tests 2025-09-26 18:55:21 -07:00
.github Merge pull request #2870 from rust-lang/renovate/actions-checkout-5.x 2025-09-28 16:46:48 +00:00
ci Add job to automatically update dependencies 2025-09-24 16:05:14 -07:00
crates Fix heading nav with folded chapters 2025-10-20 17:31:40 -07:00
examples Set up new workspace publish workflow 2025-09-26 17:40:34 -07:00
guide Add link to output.html.definition-lists 2025-09-18 20:20:25 -07:00
src Move get_404_output_file to HtmlConfig 2025-09-19 18:11:29 -07:00
tests Fix heading nav with folded chapters 2025-10-20 17:31:40 -07:00
.git-blame-ignore-revs Add more rustfmt commits to git blame ignore 2025-10-20 13:31:03 -07:00
.gitattributes Mark more font files as binary 2025-04-05 20:41:36 -04:00
.gitignore Support multiple books in the GUI tests 2025-10-15 07:00:33 -07:00
Cargo.lock Update Rust crate notify-debouncer-mini to 0.7.0 2025-09-28 10:00:01 -07:00
Cargo.toml Update Rust crate notify-debouncer-mini to 0.7.0 2025-09-28 10:00:01 -07:00
CHANGELOG.md Add 0.5 migration guide 2025-09-28 15:24:55 -07:00
CODE_OF_CONDUCT.md add explicit code of conduct, copying other rust-lang repos 2021-07-26 11:52:24 -07:00
CONTRIBUTING.md Add a syntax-highlighting GUI test 2025-10-15 07:00:35 -07:00
eslint.config.mjs Lint HBS JS templates 2025-08-25 15:15:47 -07:00
LICENSE Create LICENSE 2015-07-29 01:11:30 +02:00
package.json Update dependency browser-ui-test to v0.22.2 2025-09-28 16:17:11 +00:00
README.md README.md: update workflow status badge 2025-02-13 11:01:08 -05:00
rustfmt.toml Add rustfmt.toml 2025-07-23 17:29:55 -07:00
triagebot.toml Add triagebot range-diff feature 2025-09-24 17:00:52 -07:00

mdBook

CI Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.