# Changelog ## mdBook 0.5.2 [v0.5.1...v0.5.2](https://github.com/rust-lang/mdBook/compare/v0.5.1...v0.5.2) ### Changed - Updated Rust crate html5ever to 0.36.0. [#2970](https://github.com/rust-lang/mdBook/pull/2970) - Updated cargo dependencies. [#2969](https://github.com/rust-lang/mdBook/pull/2969) ### Fixed - Fixed repeated error message when HTML config is invalid in `mdbook serve`. [#2983](https://github.com/rust-lang/mdBook/pull/2983) - Fixed sidebar scroll position when heading nav is involved. [#2982](https://github.com/rust-lang/mdBook/pull/2982) - Fixed color for rustdoc error messages. [#2981](https://github.com/rust-lang/mdBook/pull/2981) - Fixed usage of custom preprocessors with `MDBook::test`. [#2980](https://github.com/rust-lang/mdBook/pull/2980) ## mdBook 0.5.1 [v0.5.0...v0.5.1](https://github.com/rust-lang/mdBook/compare/v0.5.0...v0.5.1) ### Changed - Changed the scrollbar background to be transparent. [#2932](https://github.com/rust-lang/mdBook/pull/2932) - Ignore invalid top-level environment variable config keys. This allows setting things like `MDBOOK_VERSION` to not cause an error. [#2952](https://github.com/rust-lang/mdBook/pull/2952) ### Fixed - Fixed the sidebar heading nav to have the correct nesting levels. [#2953](https://github.com/rust-lang/mdBook/pull/2953) - Various Font Awesome fixes and improvements. [#2951](https://github.com/rust-lang/mdBook/pull/2951) ## mdBook 0.5.0 [v0.4.52...v0.5.0](https://github.com/rust-lang/mdBook/compare/v0.4.52...v0.5.0) The 0.5.0 release is the next major release of mdBook, containing over 130 PRs since 0.4.52! The primary focus for this release has been an evolution of the Rust APIs to make it easier to maintain, to evolve in a backwards-compatible fashion, to clean up some things that have accumulated over time, and to significantly improve the performance and compile-times. This release also includes many new features described below. We have prepared a [0.5 Migration Guide](#05-migration-guide) to help existing authors switch from 0.4. The final 0.5.0 release only contains the following changes since [0.5.0-beta.2](#mdbook-050-beta2): - Added error handling to environment config handling. This checks that environment variables starting with `MDBOOK_` are correctly specified instead of silently ignoring. This also fixed being able to replace entire top-level tables like `MDBOOK_OUTPUT`. [#2942](https://github.com/rust-lang/mdBook/pull/2942) ## 0.5 Migration Guide The 0.5 release contains several breaking changes from the 0.4 release. Preprocessors and renderers will need to be migrated to continue to work with this release. After updating your configuration, it is recommended to carefully compare and review how your book renders to ensure everything is working correctly. If you have overridden any of the theme files, you will likely need to update them to match the current version. See the entries below for [mdBook 0.5.0-alpha.1](#mdbook-050-alpha1), [mdBook 0.5.0-beta.1](#mdbook-050-beta1), and [mdBook 0.5.0-beta.2](#mdbook-050-beta2) for a more complete list of changes and fixes. The following is a summary of the changes that may require your attention when updating to 0.5: ### Major additions - Added sidebar heading navigation. This includes the `output.html.sidebar-header-nav` option to disable it. [#2822](https://github.com/rust-lang/mdBook/pull/2822) - Added support for definition lists. These are enabled by default, with the option `output.html.definition-lists` to disable it. See [docs](https://rust-lang.github.io/mdBook/format/markdown.html#definition-lists) for more. [#2847](https://github.com/rust-lang/mdBook/pull/2847) - Added support for admonitions. These are enabled by default, with the option `output.html.admonitions` to disable it. See [docs](https://rust-lang.github.io/mdBook/format/markdown.html#admonitions) for more. [#2851](https://github.com/rust-lang/mdBook/pull/2851) - Links on the print page now link to elements on the print page instead of linking out to the individual chapters. [#2844](https://github.com/rust-lang/mdBook/pull/2844) ### Config changes - Unknown fields in config are now an error. [#2787](https://github.com/rust-lang/mdBook/pull/2787) [#2801](https://github.com/rust-lang/mdBook/pull/2801) - Removed `curly-quotes`, use `output.html.smart-punctuation` instead. [#2788](https://github.com/rust-lang/mdBook/pull/2788) - Removed `output.html.copy-fonts`. The default fonts are now always copied unless you override the `theme/fonts/fonts.css` file. [#2790](https://github.com/rust-lang/mdBook/pull/2790) - If the `command` path for a renderer or preprocessor is relative, it is now always relative to the book root. [#2792](https://github.com/rust-lang/mdBook/pull/2792) [#2796](https://github.com/rust-lang/mdBook/pull/2796) - Added the `optional` field for preprocessors. The default is `false`, so this also means it is an error by default if the preprocessor is missing. [#2797](https://github.com/rust-lang/mdBook/pull/2797) - `output.html.smart-punctuation` is now `true` by default. [#2810](https://github.com/rust-lang/mdBook/pull/2810) - `output.html.hash-files` is now `true` by default. [#2820](https://github.com/rust-lang/mdBook/pull/2820) - Removed support for google-analytics. Use a theme extension (like `head.hbs`) if you need to continue to support this. [#2776](https://github.com/rust-lang/mdBook/pull/2776) - Removed the `book.multilingual` field. This was never used. [#2775](https://github.com/rust-lang/mdBook/pull/2775) - Removed the very old legacy config support. Warnings have been displayed in previous versions on how to migrate. [#2783](https://github.com/rust-lang/mdBook/pull/2783) - Top-level config values set from the environment like `MDBOOK_BOOK` now *replace* the contents of the top-level table instead of merging into it. [#2942](https://github.com/rust-lang/mdBook/pull/2942) - Invalid environment variables are now rejected. Previously unknown keys like `MDBOOK_FOO` would be ignored, or keys or invalid values inside objects like the `[book]` table would be ignored. [#2942](https://github.com/rust-lang/mdBook/pull/2942) ### Theme changes - Replaced the `{{#previous}}` and `{{#next}}` handlebars helpers with simple objects that contain the previous and next values. [#2794](https://github.com/rust-lang/mdBook/pull/2794) - Removed the `{{theme_option}}` handlebars helper. It has not been used for a while. [#2795](https://github.com/rust-lang/mdBook/pull/2795) ### Rendering changes - Updated to a newer version of `pulldown-cmark`. This brings a large number of fixes to markdown processing. [#2401](https://github.com/rust-lang/mdBook/pull/2401) - The font-awesome font is no longer loaded as a font. Instead, the corresponding SVG is embedded in the output for the corresponding `` tags. Additionally, a handlebars helper has been added for the `hbs` files. This also updates the version from 4.7.0 to 6.2.0, which means some of the icon names and styles have changed. Most of the free icons are in the "solid" set. See the [free icon set](https://fontawesome.com/v6/search) for the available icons. [#1330](https://github.com/rust-lang/mdBook/pull/1330) - Changed all internal HTML IDs to have an `mdbook-` prefix. This helps avoid namespace conflicts with header IDs. [#2808](https://github.com/rust-lang/mdBook/pull/2808) - There is a new internal HTML rendering pipeline. This is primarily intended to give mdBook more flexibility in generating its HTML output. This resulted in some small changes to the HTML structure. HTML parsing may now be more strict than before. [#2844](https://github.com/rust-lang/mdBook/pull/2844) - Links on the print page now link to elements on the print page instead of linking out to the individual chapters. [#2844](https://github.com/rust-lang/mdBook/pull/2844) - Added support for definition lists. These are enabled by default, with the option `output.html.definition-lists` to disable it. [#2847](https://github.com/rust-lang/mdBook/pull/2847) - Added support for admonitions. These are enabled by default, with the option `output.html.admonitions` to disable it. [#2851](https://github.com/rust-lang/mdBook/pull/2851) - Header ID generation has some minor changes to bring the ID generation closer to other tools and sites: - IDs now use Unicode lowercase instead of ASCII lowercase. [#2922](https://github.com/rust-lang/mdBook/pull/2922) - Headers that start or end with HTML characters like `<`, `&`, or `>` now replace those characters in the link ID with `-` instead of being stripped. [#2844](https://github.com/rust-lang/mdBook/pull/2844) - Headers are no longer modified if the tag is manually written HTML. [#2913](https://github.com/rust-lang/mdBook/pull/2913) ### CLI changes - Removed the `--dest-dir` option to `mdbook test`. It was unused since `mdbook test` does not generate output. [#2805](https://github.com/rust-lang/mdBook/pull/2805) - Changed CLI `--dest-dir` to be relative to the current directory, not the book root. [#2806](https://github.com/rust-lang/mdBook/pull/2806) ### Rust API - The Rust API has been split into several crates ([#2766](https://github.com/rust-lang/mdBook/pull/2766)). In summary, the different crates are: - `mdbook` — The CLI binary. - [`mdbook-driver`](https://docs.rs/mdbook-driver/latest/mdbook_driver/) — The high-level library for running mdBook, primarily through the `MDBook` type. If you are driving mdBook programmatically, this is the crate you want. - [`mdbook-preprocessor`](https://docs.rs/mdbook-preprocessor/latest/mdbook_preprocessor/) — Support for implementing preprocessors. If you have a preprocessor, then this is the crate you should depend on. - [`mdbook-renderer`](https://docs.rs/mdbook-renderer/latest/mdbook_renderer/) — Support for implementing renderers. If you have a custom renderer, this is the crate you should depend on. - [`mdbook-markdown`](https://docs.rs/mdbook-markdown/latest/mdbook_markdown/) — The Markdown renderer. If you are processing markdown, this is the crate you should depend on. This is essentially a thin wrapper around `pulldown-cmark`, and re-exports that crate so that you can ensure the version stays in sync with mdBook. - [`mdbook-summary`](https://docs.rs/mdbook-summary/latest/mdbook_summary/) — The `SUMMARY.md` parser. - [`mdbook-html`](https://docs.rs/mdbook-html/latest/mdbook_html/) — The HTML renderer. - [`mdbook-core`](https://docs.rs/mdbook-core/latest/mdbook_core/) — An internal library that is used by the other crates for shared types. You should not depend on this crate directly since types from this crate are re-exported from the other crates as appropriate. - Changes to `Config`: - [`Config::get`](https://docs.rs/mdbook-core/latest/mdbook_core/config/struct.Config.html#method.get) is now generic over the return value, using `serde` to deserialize the value. It also returns a `Result` to handle deserialization errors. [#2773](https://github.com/rust-lang/mdBook/pull/2773) - [`Config::set`](https://docs.rs/mdbook-core/latest/mdbook_core/config/struct.Config.html#method.set) now validates that the config keys and values are valid. [#2942](https://github.com/rust-lang/mdBook/pull/2942) - [`Config::update_from_env`](https://docs.rs/mdbook-core/latest/mdbook_core/config/struct.Config.html#method.update_from_env) now returns a `Result` to indicate any errors. [#2942](https://github.com/rust-lang/mdBook/pull/2942) - Removed `Config::get_deserialized`. Use `Config::get` instead. - Removed `Config::get_deserialized_opt`. Use `Config::get` instead. - Removed `Config::get_mut`. Use `Config::set` instead. - Removed deprecated `Config::get_deserialized_opt`. Use `Config::get` instead. - Removed `Config::get_renderer`. Use `Config::get` instead. - Removed `Config::get_preprocessor`. Use `Config::get` instead. - Public types have been switch to use the `#[non_exhaustive]` attribute to help allow them to change in a backwards-compatible way. [#2779](https://github.com/rust-lang/mdBook/pull/2779) [#2823](https://github.com/rust-lang/mdBook/pull/2823) - Changed `MDBook` `with_renderer`/`with_preprocessor` to overwrite the entry if an extension of the same name is already loaded. This allows the caller to replace an entry. [#2802](https://github.com/rust-lang/mdBook/pull/2802) - Added `MarkdownOptions` struct to specify settings for markdown rendering for `mdbook_markdown::new_cmark_parser`. [#2809](https://github.cocm/rust-lang/mdBook/pull/2809) - Renamed `Book::sections` to `Book::items`. [#2813](https://github.com/rust-lang/mdBook/pull/2813) - `mdbook::book::load_book` is now private. Instead, use one of the `MDBook` load functions like `MDBook::load_with_config`. - Removed `HtmlConfig::smart_punctuation` method, use the field of the same name. - `CmdPreprocessor::parse_input` moved to `mdbook_preprocessor::parse_input`. - `Preprocessor::supports_renderer` now returns a `Result` instead of `bool` to be able to handle errors. - Most of the types from the `theme` module are now private. The `Theme` struct is still exposed for working with themes. - Various functions in the `utils::fs` module have been removed, renamed, or reworked. - Most of the functions in the `utils` module have been moved, removed, or made private. ## mdBook 0.5.0-beta.2 [v0.5.0-beta.1...v0.5.0-beta.2](https://github.com/rust-lang/mdBook/compare/v0.5.0-beta.1...v0.5.0-beta.2) ### Added - Added a warning when a Font Awesome icon is missing. [#2915](https://github.com/rust-lang/mdBook/pull/2915) - Added some trace logging for event processing. [#2911](https://github.com/rust-lang/mdBook/pull/2911) - Added `Config::contains_key`. [#2910](https://github.com/rust-lang/mdBook/pull/2910) ### Changed - Heading IDs are now lowercase. [#2922](https://github.com/rust-lang/mdBook/pull/2922) - Updated cargo dependencies. [#2916](https://github.com/rust-lang/mdBook/pull/2916) - Removed italics for in quotes/comments in code blocks with the `ayu` theme. [#2904](https://github.com/rust-lang/mdBook/pull/2904) - Exposed "search" feature from mdbook-driver. [#2907](https://github.com/rust-lang/mdBook/pull/2907) ### Fixed - Fixed rust fenced code blocks with an indent. [#2905](https://github.com/rust-lang/mdBook/pull/2905) - Headers and `dt` tags are no longer modified if the tag is manually written HTML. [#2913](https://github.com/rust-lang/mdBook/pull/2913) - Fixed print page links for internal links to non-chapters. [#2914](https://github.com/rust-lang/mdBook/pull/2914) - Better handling for unbalanced HTML tags. [#2924](https://github.com/rust-lang/mdBook/pull/2924) - Handle unclosed HTML tags inside a markdown element. [#2927](https://github.com/rust-lang/mdBook/pull/2927) - Fixed missing font-awesome icons in the guide. [#2926](https://github.com/rust-lang/mdBook/pull/2926) - Hide the sidebar resize indicator when JS isn't available. [#2923](https://github.com/rust-lang/mdBook/pull/2923) ## mdBook 0.5.0-beta.1 [v0.5.0-alpha.1...v0.5.0-beta.1](https://github.com/rust-lang/mdBook/compare/v0.5.0-alpha.1...v0.5.0-beta.1) ### Changed - Reworked the look of the header navigation. [#2898](https://github.com/rust-lang/mdBook/pull/2898) - Update cargo dependencies. [#2896](https://github.com/rust-lang/mdBook/pull/2896) - Improved the heading nav debug. [#2892](https://github.com/rust-lang/mdBook/pull/2892) ### Fixed - Fixed error message for config.get deserialization error. [#2902](https://github.com/rust-lang/mdBook/pull/2902) - Filter `` tags from sidebar heading nav. [#2899](https://github.com/rust-lang/mdBook/pull/2899) - Avoid divide-by-zero in heading nav computation [#2891](https://github.com/rust-lang/mdBook/pull/2891) - Fixed heading nav with folded chapters. [#2893](https://github.com/rust-lang/mdBook/pull/2893) ## mdBook 0.5.0-alpha.1 [v0.4.52...v0.5.0-alpha.1](https://github.com/rust-lang/mdBook/compare/v0.4.52...v0.5.0-alpha.1) ### Added - The location of the generated HTML book is now displayed on the console. [#2729](https://github.com/rust-lang/mdBook/pull/2729) - ❗ Added the `optional` field for preprocessors. The default is `false`, so this also changes it so that it is an error if the preprocessor is missing. [#2797](https://github.com/rust-lang/mdBook/pull/2797) - ❗ Added `MarkdownOptions` struct to specify settings for markdown rendering. [#2809](https://github.cocm/rust-lang/mdBook/pull/2809) - Added sidebar heading navigation. This includes the `output.html.sidebar-header-nav` option to disable it. [#2822](https://github.com/rust-lang/mdBook/pull/2822) - Added the mdbook version to the guide. [#2826](https://github.com/rust-lang/mdBook/pull/2826) - Added `Book::chapters` and `Book::for_each_chapter_mut` to more conveniently iterate over chapters (instead of all items). [#2838](https://github.com/rust-lang/mdBook/pull/2838) - ❗ Added support for definition lists. These are enabled by default, with the option `output.html.definition-lists` to disable it. [#2847](https://github.com/rust-lang/mdBook/pull/2847) - ❗ Added support for admonitions. These are enabled by default, with the option `output.html.admonitions` to disable it. [#2851](https://github.com/rust-lang/mdBook/pull/2851) ### Changed - ❗ The `mdbook` crate has been split into multiple crates. [#2766](https://github.com/rust-lang/mdBook/pull/2766) - The minimum Rust version has been updated to 1.88. [#2844](https://github.com/rust-lang/mdBook/pull/2844) - ❗ `pulldown-cmark` has been upgraded to 0.13.0, bringing a large number of fixes to markdown processing. [#2401](https://github.com/rust-lang/mdBook/pull/2401) - ❗ Switched public types to `non_exhaustive` to help allow them to change in a backwards-compatible way. [#2779](https://github.com/rust-lang/mdBook/pull/2779) [#2823](https://github.com/rust-lang/mdBook/pull/2823) - ❗ Unknown fields in config are now an error. [#2787](https://github.com/rust-lang/mdBook/pull/2787) [#2801](https://github.com/rust-lang/mdBook/pull/2801) - ❗ Changed `id_from_content` to be private. [#2791](https://github.com/rust-lang/mdBook/pull/2791) - ❗ Changed preprocessor `command` to use paths relative to the book root. [#2796](https://github.com/rust-lang/mdBook/pull/2796) - ❗ Replaced the `{{#previous}}` and `{{#next}}` handelbars navigation helpers with objects. [#2794](https://github.com/rust-lang/mdBook/pull/2794) - ❗ Use embedded SVG instead of fonts for icons, font-awesome 6.2. [#1330](https://github.com/rust-lang/mdBook/pull/1330) - The `book.src` field is no longer serialized if it is the default of "src". [#2800](https://github.com/rust-lang/mdBook/pull/2800) - ❗ Changed `MDBook` `with_renderer`/`with_preprocessor` to overwrite the entry if an extension of the same name is already loaded. [#2802](https://github.com/rust-lang/mdBook/pull/2802) - ❗ Changed CLI `--dest-dir` to be relative to the current directory, not the book root. [#2806](https://github.com/rust-lang/mdBook/pull/2806) - ❗ Changed all internal HTML IDs to have an `mdbook-` prefix. This helps avoid namespace conflicts with header IDs. [#2808](https://github.com/rust-lang/mdBook/pull/2808) - ❗ `output.html.smart-punctuation` is now `true` by default. [#2810](https://github.com/rust-lang/mdBook/pull/2810) - ❗ Renamed `Book::sections` to `Book::items`. [#2813](https://github.com/rust-lang/mdBook/pull/2813) - ❗ `output.html.hash-files` is now `true` by default. [#2820](https://github.com/rust-lang/mdBook/pull/2820) - Switched from `log` to `tracing`. [#2829](https://github.com/rust-lang/mdBook/pull/2829) - ❗ Rewrote the HTML rendering pipeline. [#2844](https://github.com/rust-lang/mdBook/pull/2844) - ❗ Links on the print page now link to elements on the print page instead of linking out to the individual chapters. [#2844](https://github.com/rust-lang/mdBook/pull/2844) - ❗ Moved theme copy to the Theme type and reduced visibility. [#2857](https://github.com/rust-lang/mdBook/pull/2857) - ❗ Cleaned up some fs-related utilities. [#2856](https://github.com/rust-lang/mdBook/pull/2856) - ❗ Moved `get_404_output_file` to `HtmlConfig`. [#2855](https://github.com/rust-lang/mdBook/pull/2855) - ❗ Moved `take_lines` functions to `mdbook-driver` and made private. [#2854](https://github.com/rust-lang/mdBook/pull/2854) - Updated dependencies. [#2793](https://github.com/rust-lang/mdBook/pull/2793) [#2869](https://github.com/rust-lang/mdBook/pull/2869) ### Removed - ❗ Removed `toml` as a public dependency. [#2773](https://github.com/rust-lang/mdBook/pull/2773) - ❗ Removed the `book.multilingual` field. This was never used. [#2775](https://github.com/rust-lang/mdBook/pull/2775) - ❗ Removed support for google-analytics. [#2776](https://github.com/rust-lang/mdBook/pull/2776) - ❗ Removed the very old legacy config support. [#2783](https://github.com/rust-lang/mdBook/pull/2783) - ❗ Removed `curly-quotes`, use `output.html.smart-punctuation` instead. [#2788](https://github.com/rust-lang/mdBook/pull/2788) - Removed old warning about `book.json`. [#2789](https://github.com/rust-lang/mdBook/pull/2789) - ❗ Removed `output.html.copy-fonts`. The default fonts are now always copied unless you override the `theme/fonts/fonts.css` file. [#2790](https://github.com/rust-lang/mdBook/pull/2790) - ❗ Removed legacy relative renderer command paths. Relative renderer command paths now must always be relative to the book root. [#2792](https://github.com/rust-lang/mdBook/pull/2792) - ❗ Removed the `{{theme_option}}` handlebars helper. It has not been used for a while. [#2795](https://github.com/rust-lang/mdBook/pull/2795) - ❗ Removed the `--dest-dir` option to `mdbook test`. [#2805](https://github.com/rust-lang/mdBook/pull/2805) ### Fixed - Fixed handling of multiple footnotes in a row. [#2807](https://github.com/rust-lang/mdBook/pull/2807) - Fixed ID collisions when the numeric suffix gets used. [#2846](https://github.com/rust-lang/mdBook/pull/2846) - Fixed missing css vars for no-js dark mode. [#2850](https://github.com/rust-lang/mdBook/pull/2850) ## mdBook 0.4.52 [v0.4.51...v0.4.52](https://github.com/rust-lang/mdBook/compare/v0.4.51...v0.4.52) **Note:** If you have a custom `index.hbs` theme file, it is recommended that you update it to the latest version to pick up the fixes in this release. ### Added - Added the ability to redirect `#` HTML fragments using the existing `output.html.redirect` table. [#2747](https://github.com/rust-lang/mdBook/pull/2747) - Added the `rel="edit"` attribute to the edit page button. [#2702](https://github.com/rust-lang/mdBook/pull/2702) ### Changed - The search index is now only loaded when the search input is opened instead of always being loaded. [#2553](https://github.com/rust-lang/mdBook/pull/2553) [#2735](https://github.com/rust-lang/mdBook/pull/2735) - The `mdbook serve` command has switched its underlying server library from warp to axum. [#2748](https://github.com/rust-lang/mdBook/pull/2748) - Updated dependencies. [#2752](https://github.com/rust-lang/mdBook/pull/2752) ### Fixed - The sidebar is now set to `display:none` when it is hidden in order to prevent the browser's search from thinking the sidebar's text is visible. [#2725](https://github.com/rust-lang/mdBook/pull/2725) - Fixed search index URL not updating correctly when `hash-files` is enabled. [#2742](https://github.com/rust-lang/mdBook/pull/2742) [#2746](https://github.com/rust-lang/mdBook/pull/2746) - Fixed several sidebar animation bugs, particularly when manually resizing. [#2750](https://github.com/rust-lang/mdBook/pull/2750) ## mdBook 0.4.51 [v0.4.50...v0.4.51](https://github.com/rust-lang/mdBook/compare/v0.4.50...v0.4.51) ### Fixed - Fixed regression that broke the `S` search hotkey. [#2713](https://github.com/rust-lang/mdBook/pull/2713) ## mdBook 0.4.50 [v0.4.49...v0.4.50](https://github.com/rust-lang/mdBook/compare/v0.4.49...v0.4.50) ### Added - Added a keyboard shortcut help popup when pressing `?`. [#2608](https://github.com/rust-lang/mdBook/pull/2608) ### Changed - Changed the look of the sidebar resize handle to match the new rustdoc format. [#2691](https://github.com/rust-lang/mdBook/pull/2691) - `/` can now be used to open the search bar. [#2698](https://github.com/rust-lang/mdBook/pull/2698) - Pressing enter from the search bar will navigate to the first entry. [#2698](https://github.com/rust-lang/mdBook/pull/2698) - Updated `opener` to drop some dependencies. [#2709](https://github.com/rust-lang/mdBook/pull/2709) - Updated dependencies, MSRV raised to 1.82. [#2711](https://github.com/rust-lang/mdBook/pull/2711) ### Fixed - Fixed uncaught exception when pressing down when there are no search results. [#2698](https://github.com/rust-lang/mdBook/pull/2698) - Fixed syntax highlighting of Rust code in the ACE editor. [#2710](https://github.com/rust-lang/mdBook/pull/2710) ## mdBook 0.4.49 [v0.4.48...v0.4.49](https://github.com/rust-lang/mdBook/compare/v0.4.48...v0.4.49) ### Added - Added a warning on unused fields in the root of `book.toml`. [#2622](https://github.com/rust-lang/mdBook/pull/2622) ### Changed - Updated dependencies. [#2650](https://github.com/rust-lang/mdBook/pull/2650) [#2688](https://github.com/rust-lang/mdBook/pull/2688) - Updated minimum Rust version to 1.81. [#2688](https://github.com/rust-lang/mdBook/pull/2688) - The unused `book.multilingual` field is no longer serialized, or shown in `mdbook init`. [#2689](https://github.com/rust-lang/mdBook/pull/2689) - Speed up search index loading by using `JSON.parse` instead of parsing JavaScript. [#2633](https://github.com/rust-lang/mdBook/pull/2633) ### Fixed - Search highlighting will not try to highlight in SVG `` elements because it breaks the element. [#2668](https://github.com/rust-lang/mdBook/pull/2668) - Fixed scrolling of the sidebar when a search highlight term is in the URL. [#2675](https://github.com/rust-lang/mdBook/pull/2675) - Fixed issues when multiple footnote definitions use the same ID. Now, only one definition is used, and a warning is displayed. [#2681](https://github.com/rust-lang/mdBook/pull/2681) - The sidebar is now restricted to 80% of the viewport width to make it possible to collapse it when the viewport is very narrow. [#2679](https://github.com/rust-lang/mdBook/pull/2679) ## mdBook 0.4.48 [v0.4.47...v0.4.48](https://github.com/rust-lang/mdBook/compare/v0.4.47...v0.4.48) ### Added - Footnotes now have back-reference links. These links bring the reader back to the original location. As part of this change, footnotes are now only rendered at the bottom of the page. This also includes some styling updates and fixes for footnote rendering. [#2626](https://github.com/rust-lang/mdBook/pull/2626) - Added an "Auto" theme selection option which will default to the system-preferred mode. This will also automatically switch when the system changes the preferred mode. [#2576](https://github.com/rust-lang/mdBook/pull/2576) ### Changed - The `searchindex.json` file has been removed; only the `searchindex.js` file will be generated. [#2552](https://github.com/rust-lang/mdBook/pull/2552) - Updated Javascript code to use eslint. [#2554](https://github.com/rust-lang/mdBook/pull/2554) - An error is generated if there are duplicate files in `SUMMARY.md`. [#2613](https://github.com/rust-lang/mdBook/pull/2613) ## mdBook 0.4.47 [v0.4.46...v0.4.47](https://github.com/rust-lang/mdBook/compare/v0.4.46...v0.4.47) ### Fixed - Fixed search not showing up in sub-directories. [#2586](https://github.com/rust-lang/mdBook/pull/2586) ## mdBook 0.4.46 [v0.4.45...v0.4.46](https://github.com/rust-lang/mdBook/compare/v0.4.45...v0.4.46) ### Changed - The `output.html.hash-files` config option has been added to add hashes to static filenames to bust any caches when a book is updated. `{{resource}}` template tags have been added so that links can be properly generated to those files. [#1368](https://github.com/rust-lang/mdBook/pull/1368) ### Fixed - Playground links for Rust 2024 now set the edition correctly. [#2557](https://github.com/rust-lang/mdBook/pull/2557) ## mdBook 0.4.45 [v0.4.44...v0.4.45](https://github.com/rust-lang/mdBook/compare/v0.4.44...v0.4.45) ### Changed - Added context to error message when rustdoc is not found. [#2545](https://github.com/rust-lang/mdBook/pull/2545) - Slightly changed the styling rules around margins of footnotes. [#2524](https://github.com/rust-lang/mdBook/pull/2524) ### Fixed - Fixed an issue where it would panic if a source_path is not set. [#2550](https://github.com/rust-lang/mdBook/pull/2550) ## mdBook 0.4.44 [v0.4.43...v0.4.44](https://github.com/rust-lang/mdBook/compare/v0.4.43...v0.4.44) ### Added - Added pre-built aarch64-apple-darwin binaries to the releases. [#2500](https://github.com/rust-lang/mdBook/pull/2500) - `mdbook clean` now shows a summary of what it did. [#2458](https://github.com/rust-lang/mdBook/pull/2458) - Added the `output.html.search.chapter` config setting to disable search indexing of individual chapters. [#2533](https://github.com/rust-lang/mdBook/pull/2533) ### Fixed - Fixed auto-scrolling the side-bar when loading a page with a `#` fragment URL. [#2517](https://github.com/rust-lang/mdBook/pull/2517) - Fixed display of sidebar when javascript is disabled. [#2529](https://github.com/rust-lang/mdBook/pull/2529) - Fixed the sidebar visibility getting out of sync with the button. [#2532](https://github.com/rust-lang/mdBook/pull/2532) ### Changed - ❗ Rust code block hidden lines now follow the same logic as rustdoc. This requires a space after the `#` symbol. [#2530](https://github.com/rust-lang/mdBook/pull/2530) - ❗ Updated the Linux pre-built binaries which requires a newer version of glibc (2.34). [#2523](https://github.com/rust-lang/mdBook/pull/2523) - Updated dependencies [#2538](https://github.com/rust-lang/mdBook/pull/2538) [#2539](https://github.com/rust-lang/mdBook/pull/2539) ## mdBook 0.4.43 [v0.4.42...v0.4.43](https://github.com/rust-lang/mdBook/compare/v0.4.42...v0.4.43) ### Fixed - Fixed setting the title in `mdbook init` when no git user is configured. [#2486](https://github.com/rust-lang/mdBook/pull/2486) ### Changed - The Rust 2024 edition no longer needs `-Zunstable-options`. [#2495](https://github.com/rust-lang/mdBook/pull/2495) ## mdBook 0.4.42 [v0.4.41...v0.4.42](https://github.com/rust-lang/mdBook/compare/v0.4.41...v0.4.42) ### Fixed - Fixed chapter list folding. [#2473](https://github.com/rust-lang/mdBook/pull/2473) ## mdBook 0.4.41 [v0.4.40...v0.4.41](https://github.com/rust-lang/mdBook/compare/v0.4.40...v0.4.41) **Note:** If you have a custom `index.hbs` theme file, you will need to update it to the latest version. ### Added - Added preliminary support for Rust 2024 edition. [#2398](https://github.com/rust-lang/mdBook/pull/2398) - Added a full example of the remove-emphasis preprocessor. [#2464](https://github.com/rust-lang/mdBook/pull/2464) ### Changed - Adjusted styling of clipboard/play icons. [#2421](https://github.com/rust-lang/mdBook/pull/2421) - Updated to handlebars v6. [#2416](https://github.com/rust-lang/mdBook/pull/2416) - Attr and section rules now have specific code highlighting. [#2448](https://github.com/rust-lang/mdBook/pull/2448) - The sidebar is now loaded from a common file, significantly reducing the book size when there are many chapters. [#2414](https://github.com/rust-lang/mdBook/pull/2414) - Updated dependencies. [#2470](https://github.com/rust-lang/mdBook/pull/2470) ### Fixed - Improved theme support when JavaScript is disabled. [#2454](https://github.com/rust-lang/mdBook/pull/2454) - Fixed broken themes when localStorage has an invalid theme id. [#2463](https://github.com/rust-lang/mdBook/pull/2463) - Adjusted the line-height of superscripts (and footnotes) to avoid adding extra space between lines. [#2465](https://github.com/rust-lang/mdBook/pull/2465) ## mdBook 0.4.40 [v0.4.39...v0.4.40](https://github.com/rust-lang/mdBook/compare/v0.4.39...v0.4.40) ### Fixed - Reverted the update to pulldown-cmark which broke the semver API. [#2388](https://github.com/rust-lang/mdBook/pull/2388) ## mdBook 0.4.39 [v0.4.38...v0.4.39](https://github.com/rust-lang/mdBook/compare/v0.4.38...v0.4.39) ### Fixed - Fixed the automatic deploy broken in the previous release. [#2383](https://github.com/rust-lang/mdBook/pull/2383) ## mdBook 0.4.38 [v0.4.37...v0.4.38](https://github.com/rust-lang/mdBook/compare/v0.4.37...v0.4.38) ### Added - Added `nix` to the default set of languages supported for syntax highlighting. [#2262](https://github.com/rust-lang/mdBook/pull/2262) ### Changed - The `output.html.curly-quotes` option has been renamed to `output.html.smart-punctuation` to better reflect what it does. The old option `curly-quotes` is kept for compatibility, but may be removed in the future. [#2327](https://github.com/rust-lang/mdBook/pull/2327) - The file-watcher used in `mdbook serve` and `mdbook watch` now uses a poll-based watcher instead of the native operating system notifications. This should fix issues on various systems and environments, and more accurately detect when files change. The native watcher can still be used with the `--watcher native` CLI option. [#2325](https://github.com/rust-lang/mdBook/pull/2325) - `mdbook test` output now includes color, and shows relative paths to the source. [#2259](https://github.com/rust-lang/mdBook/pull/2259) - Updated dependencies, MSRV raised to 1.74 [#2350](https://github.com/rust-lang/mdBook/pull/2350) [#2351](https://github.com/rust-lang/mdBook/pull/2351) [#2378](https://github.com/rust-lang/mdBook/pull/2378) [#2381](https://github.com/rust-lang/mdBook/pull/2381) ### Fixed - Reduced memory allocation when copying files. [#2355](https://github.com/rust-lang/mdBook/pull/2355) - Fixed the horizontal divider in `SUMMARY.md` from being indented into the previous nested section. [#2364](https://github.com/rust-lang/mdBook/pull/2364) - Removed unnecessary `@import` in the CSS. [#2260](https://github.com/rust-lang/mdBook/pull/2260) ## mdBook 0.4.37 [v0.4.36...v0.4.37](https://github.com/rust-lang/mdBook/compare/v0.4.36...v0.4.37) ### Changed - ❗️ Updated the markdown parser. This brings in many changes to more closely follow the CommonMark spec. This may cause some small rendering changes. It is recommended to compare the output of the old and new version to check for changes. See for more information. [#2308](https://github.com/rust-lang/mdBook/pull/2308) - The warning about the legacy `src/theme` directory has been removed. [#2263](https://github.com/rust-lang/mdBook/pull/2263) - Updated dependencies. MSRV raised to 1.71.0. [#2283](https://github.com/rust-lang/mdBook/pull/2283) [#2293](https://github.com/rust-lang/mdBook/pull/2293) [#2297](https://github.com/rust-lang/mdBook/pull/2297) [#2310](https://github.com/rust-lang/mdBook/pull/2310) [#2309](https://github.com/rust-lang/mdBook/pull/2309) - Some internal performance/memory improvements. [#2273](https://github.com/rust-lang/mdBook/pull/2273) [#2290](https://github.com/rust-lang/mdBook/pull/2290) - Made the `pathdiff` dependency optional based on the `watch` feature. [#2291](https://github.com/rust-lang/mdBook/pull/2291) ### Fixed - The `s` shortcut key handler should not trigger when focus is in an HTML form. [#2311](https://github.com/rust-lang/mdBook/pull/2311) ## mdBook 0.4.36 [v0.4.35...v0.4.36](https://github.com/rust-lang/mdBook/compare/v0.4.35...v0.4.36) ### Added - Added Nim to the default highlighted languages. [#2232](https://github.com/rust-lang/mdBook/pull/2232) - Added a small indicator for the sidebar resize handle. [#2209](https://github.com/rust-lang/mdBook/pull/2209) ### Changed - Updated dependencies. MSRV raised to 1.70.0. [#2173](https://github.com/rust-lang/mdBook/pull/2173) [#2250](https://github.com/rust-lang/mdBook/pull/2250) [#2252](https://github.com/rust-lang/mdBook/pull/2252) ### Fixed - Fixed blank column in print page when the sidebar was visible. [#2235](https://github.com/rust-lang/mdBook/pull/2235) - Fixed indentation of code blocks when Javascript is disabled. [#2162](https://github.com/rust-lang/mdBook/pull/2162) - Fixed a panic when `mdbook serve` or `mdbook watch` were given certain kinds of paths. [#2229](https://github.com/rust-lang/mdBook/pull/2229) ## mdBook 0.4.35 [v0.4.34...v0.4.35](https://github.com/rust-lang/mdBook/compare/v0.4.34...v0.4.35) ### Added - Added the `book.text-direction` setting for explicit support for right-to-left languages. [#1641](https://github.com/rust-lang/mdBook/pull/1641) - Added `rel=prefetch` to the "next" links to potentially improve browser performance. [#2168](https://github.com/rust-lang/mdBook/pull/2168) - Added a `.warning` CSS class which is styled for displaying warning blocks. [#2187](https://github.com/rust-lang/mdBook/pull/2187) ### Changed - Better support of the sidebar when JavaScript is disabled. [#2175](https://github.com/rust-lang/mdBook/pull/2175) ## mdBook 0.4.34 [v0.4.33...v0.4.34](https://github.com/rust-lang/mdBook/compare/v0.4.33...v0.4.34) ### Fixed - Fixed file change watcher failing on macOS with a large number of files. [#2157](https://github.com/rust-lang/mdBook/pull/2157) ## mdBook 0.4.33 [v0.4.32...v0.4.33](https://github.com/rust-lang/mdBook/compare/v0.4.32...v0.4.33) ### Added - The `color-scheme` CSS property is now set based on the light/dark theme, which applies some slight color differences in browser elements like scroll bars on some browsers. [#2134](https://github.com/rust-lang/mdBook/pull/2134) ### Fixed - Fixed watching of extra-watch-dirs when not running in the book root directory. [#2146](https://github.com/rust-lang/mdBook/pull/2146) - Reverted the dependency update to the `toml` crate (again!). This was an unintentional breaking change in 0.4.32. [#2021](https://github.com/rust-lang/mdBook/pull/2021) - Changed macOS change notifications to use the kqueue implementation which should fix some issues with repeated rebuilds when a file changed. [#2152](https://github.com/rust-lang/mdBook/pull/2152) - Don't set a background color in the print page for code blocks in a header. [#2150](https://github.com/rust-lang/mdBook/pull/2150) ## mdBook 0.4.32 [v0.4.31...v0.4.32](https://github.com/rust-lang/mdBook/compare/v0.4.31...v0.4.32) ### Fixed - Fixed theme-color meta tag not syncing with the theme. [#2118](https://github.com/rust-lang/mdBook/pull/2118) ### Changed - Updated all dependencies. [#2121](https://github.com/rust-lang/mdBook/pull/2121) [#2122](https://github.com/rust-lang/mdBook/pull/2122) [#2123](https://github.com/rust-lang/mdBook/pull/2123) [#2124](https://github.com/rust-lang/mdBook/pull/2124) [#2125](https://github.com/rust-lang/mdBook/pull/2125) [#2126](https://github.com/rust-lang/mdBook/pull/2126) ## mdBook 0.4.31 [v0.4.30...v0.4.31](https://github.com/rust-lang/mdBook/compare/v0.4.30...v0.4.31) ### Fixed - Fixed menu border render flash during page navigation. [#2101](https://github.com/rust-lang/mdBook/pull/2101) - Fixed flicker setting sidebar scroll position. [#2104](https://github.com/rust-lang/mdBook/pull/2104) - Fixed compile error with proc-macro2 on latest Rust nightly. [#2109](https://github.com/rust-lang/mdBook/pull/2109) ## mdBook 0.4.30 [v0.4.29...v0.4.30](https://github.com/rust-lang/mdBook/compare/v0.4.29...v0.4.30) ### Added - Added support for heading attributes. Attributes are specified in curly braces just after the heading text. An HTML ID can be specified with `#` and classes with `.`. For example: `## My heading {#custom-id .class1 .class2}` [#2013](https://github.com/rust-lang/mdBook/pull/2013) - Added support for hidden code lines for languages other than Rust. The `output.html.code.hidelines` table allows you to define the prefix character that will be used to hide code lines based on the language. [#2093](https://github.com/rust-lang/mdBook/pull/2093) ### Fixed - Fixed a few minor markdown rendering issues. [#2092](https://github.com/rust-lang/mdBook/pull/2092) ## mdBook 0.4.29 [v0.4.28...v0.4.29](https://github.com/rust-lang/mdBook/compare/v0.4.28...v0.4.29) ### Changed - Built-in fonts are no longer copied when `fonts/fonts.css` is overridden in the theme directory. Additionally, the warning about `copy-fonts` has been removed if `fonts/fonts.css` is specified. [#2080](https://github.com/rust-lang/mdBook/pull/2080) - `mdbook init --force` now skips all interactive prompts as intended. [#2057](https://github.com/rust-lang/mdBook/pull/2057) - Updated dependencies [#2063](https://github.com/rust-lang/mdBook/pull/2063) [#2086](https://github.com/rust-lang/mdBook/pull/2086) [#2082](https://github.com/rust-lang/mdBook/pull/2082) [#2084](https://github.com/rust-lang/mdBook/pull/2084) [#2085](https://github.com/rust-lang/mdBook/pull/2085) ### Fixed - Switched from the `gitignore` library to `ignore`. This should bring some improvements with gitignore handling. [#2076](https://github.com/rust-lang/mdBook/pull/2076) ## mdBook 0.4.28 [v0.4.27...v0.4.28](https://github.com/rust-lang/mdBook/compare/v0.4.27...v0.4.28) ### Changed - The sidebar is now shown on wide screens when localstorage is disabled. [#2017](https://github.com/rust-lang/mdBook/pull/2017) - Preprocessors are now run with `mdbook test`. [#1986](https://github.com/rust-lang/mdBook/pull/1986) ### Fixed - Fixed regression in 0.4.26 that prevented the title bar from scrolling properly on smaller screens. [#2039](https://github.com/rust-lang/mdBook/pull/2039) ## mdBook 0.4.27 [v0.4.26...v0.4.27](https://github.com/rust-lang/mdBook/compare/v0.4.26...v0.4.27) ### Changed - Reverted the dependency update to the `toml` crate. This was an unintentional breaking change in 0.4.26. [#2021](https://github.com/rust-lang/mdBook/pull/2021) ## mdBook 0.4.26 [v0.4.25...v0.4.26](https://github.com/rust-lang/mdBook/compare/v0.4.25...v0.4.26) **The 0.4.26 release has been yanked due to an unintentional breaking change.** ### Changed - Removed custom scrollbars for webkit browsers [#1961](https://github.com/rust-lang/mdBook/pull/1961) - Updated some dependencies [#1998](https://github.com/rust-lang/mdBook/pull/1998) [#2009](https://github.com/rust-lang/mdBook/pull/2009) [#2011](https://github.com/rust-lang/mdBook/pull/2011) - Fonts are now part of the theme. The `output.html.copy-fonts` option has been deprecated. To define custom fonts, be sure to define `theme/fonts.css`. [#1987](https://github.com/rust-lang/mdBook/pull/1987) ### Fixed - Fixed overflow viewport issue with mobile Safari [#1994](https://github.com/rust-lang/mdBook/pull/1994) ## mdBook 0.4.25 [e14d381...1ba74a3](https://github.com/rust-lang/mdBook/compare/e14d381...1ba74a3) ### Fixed - Fixed a regression where `mdbook test -L deps path-to-book` would not work. [#1959](https://github.com/rust-lang/mdBook/pull/1959) ## mdBook 0.4.24 [eb77083...8767ebf](https://github.com/rust-lang/mdBook/compare/eb77083...8767ebf) ### Fixed - The precompiled linux-gnu mdbook binary available on [GitHub Releases](https://github.com/rust-lang/mdBook/releases) inadvertently switched to a newer version of glibc. This release goes back to an older version that should be more compatible on older versions of Linux. [#1955](https://github.com/rust-lang/mdBook/pull/1955) ## mdBook 0.4.23 [678b469...68a75da](https://github.com/rust-lang/mdBook/compare/678b469...68a75da) ### Changed - Updated all dependencies [#1951](https://github.com/rust-lang/mdBook/pull/1951) [#1952](https://github.com/rust-lang/mdBook/pull/1952) [#1844](https://github.com/rust-lang/mdBook/pull/1844) - Updated minimum Rust version to 1.60. [#1951](https://github.com/rust-lang/mdBook/pull/1951) ### Fixed - Fixed a regression where playground code was missing hidden lines, preventing it from compiling correctly. [#1950](https://github.com/rust-lang/mdBook/pull/1950) ## mdBook 0.4.22 [40c06f5...4844f72](https://github.com/rust-lang/mdBook/compare/40c06f5...4844f72) ### Added - Added a `--chapter` option to `mdbook test` to specify a specific chapter to test. [#1741](https://github.com/rust-lang/mdBook/pull/1741) - Added CSS styling for `` tags. [#1906](https://github.com/rust-lang/mdBook/pull/1906) - Added pre-compiled binaries for `x86_64-unknown-linux-musl` and `aarch64-unknown-linux-musl` (see [Releases](https://github.com/rust-lang/mdBook/releases)). [#1862](https://github.com/rust-lang/mdBook/pull/1862) - Added `build.extra-watch-dirs` which is an array of additional directories to watch for changes when running `mdbook serve`. [#1884](https://github.com/rust-lang/mdBook/pull/1884) ### Changed - Removed the `type="text/javascript"` attribute from `