Compare commits

..

32 Commits

Author SHA1 Message Date
Eric Huss
7b29f8a717 Merge pull request #2985 from ehuss/bump-version
Update to 0.5.2
2025-12-11 19:47:18 +00:00
Eric Huss
94569a42da Update to 0.5.2 2025-12-11 11:40:27 -08:00
Eric Huss
97747621aa Merge pull request #2983 from ehuss/serve-bad-html-config
serve: Fix repeated error message when HTML config is invalid
2025-12-11 19:39:16 +00:00
Eric Huss
723d9df6c7 serve: Fix repeated error message when HTML config is invalid
This fixes an issue where `mdbook serve` would repeatedly show an error
message every second if the `output.html` config had a problem. The
issue is that `set_roots` was doing more work than I realized. It is not
necessary to call it every time in the main polling loop, since the
roots only change when the book configuration changes.

The solution is to just reset the roots whenever the book config
changes.

Fixes https://github.com/rust-lang/mdBook/issues/2946
2025-12-11 11:22:16 -08:00
Eric Huss
45e2158e84 Merge pull request #2982 from ehuss/fix-sidebar-scroll
Fix sidebar scroll position when heading nav is involved
2025-12-11 19:21:21 +00:00
Eric Huss
59017ea918 Fix sidebar scroll position when heading nav is involved
This fixes an issue where the sidebar was scrolling incorrectly when
clicking on chapters when a heading nav is currently in view. The
problem was that it was storing the scrollTop of the sidebar, but it was
not considering that when navigating to another chapter that the heading
nav of the previous chapter would disappear.

The solution is to keep of an offset instead so that it can make sure
that the vertical position of the clicked chapter stays in the same
relative position when the new page loads.

Fixes https://github.com/rust-lang/mdBook/issues/2967
2025-12-11 11:13:47 -08:00
Eric Huss
f857ab294c Merge pull request #2981 from ehuss/fix-rustdoc-color
Fix color for rustdoc error messages
2025-12-10 22:08:16 +00:00
Eric Huss
938a9126b0 Merge pull request #2980 from ehuss/fix-test-preprocessor
Don't rebuild preprocessor map during test
2025-12-10 22:03:08 +00:00
Eric Huss
23724b0a6b Fix color for rustdoc error messages
Due to a change in tracing-subscriber where it escapes ANSI codes, the
output from rustdoc was changed to be escaped instead of colored. This
fixes the issue by just printing to the console directly.

This does not have a test because it is difficult to emulate a terminal
in the testsuite, and I don't feel like adding color overrides at the
moment.

Ref:
- https://github.com/rust-lang/mdBook/pull/2829 -- Switched to tracing
- https://github.com/advisories/GHSA-xwfj-jgwm-7wp5 -- CVE-2025-58160
- https://github.com/tokio-rs/tracing/issues/3378 -- Discussion of
  supporting color codes.

Eventually mdbook's primary output should migrate away from using log
messages, and instead use a structured console system. However, that's a
ways off.
2025-12-10 14:01:50 -08:00
Eric Huss
7bdea7c085 Don't rebuild preprocessor map during test
This fixes a problem where custom preprocessors were not being
registered when running tests. This was caused by the test function
rebuilding the preprocessor map.

This removes the code that was rebuilding the preprocessors and removing
the IndexPreprocessor when running tests. Skipping IndexPreprocessor was
added back in https://github.com/rust-lang/mdBook/pull/741 to fix
https://github.com/rust-lang/mdBook/issues/724 which was caused by
https://github.com/rust-lang/mdBook/pull/685 which added the
IndexPreprocessor.

Additionally, https://github.com/rust-lang/mdBook/pull/1986 added
running *all* preprocessors.

The IndexPreprocessor was removed because in the past the code was
testing against the source directly, and the path from `chapter.path` is
the converted `index.md` file, and that filename does not exist in the
source. This isn't a problem anymore because due to
https://github.com/rust-lang/mdBook/pull/891 it is not reading from the
`src` directory.

Note that this results in a minor change where the chapter path changes
from `README.md` to `index.md` in the output and the `--chapter` option.
I think I'm ok with that change, though it would be easy to switch it
back if that's an issue.
2025-12-10 13:42:15 -08:00
Eric Huss
2bcae6b0a9 Add a test with a custom preprocessor
This test illustrates that the test function is not working correctly
when there is a custom preprocessor.
2025-12-10 12:51:19 -08:00
Eric Huss
6457b381d8 Merge pull request #2973 from LucasPickering/patch-1
Fix link for parse_input() in preprocessors.md
2025-12-02 00:15:15 +00:00
Lucas Pickering
9eb6fe0483 Fix link for parse_input() in preprocessors.md
This doc still referenced `CmdPreprocessor::parse_input`, which was removed in 0.5. Now it's just `mdbook_preprocessor::parse_input`.
2025-12-01 18:40:55 -05:00
Eric Huss
674733864f Merge pull request #2970 from rust-lang/renovate/html5ever-0.x
Update Rust crate html5ever to 0.36.0
2025-12-01 18:37:46 +00:00
renovate[bot]
3d39bf4adb Update Rust crate html5ever to 0.36.0 2025-12-01 18:31:50 +00:00
Eric Huss
55830b9fca Merge pull request #2969 from rust-lang/update-dependencies
Update cargo dependencies
2025-12-01 18:23:44 +00:00
github-actions[bot]
8bd3c52abf Update cargo dependencies
```
name               old req compatible latest new req
====               ======= ========== ====== =======
axum               0.8.6   0.8.7      0.8.7  0.8.7
clap               4.5.51  4.5.53     4.5.53 4.5.53
clap_complete      4.5.60  4.5.61     4.5.61 4.5.61
indexmap           2.12.0  2.12.1     2.12.1 2.12.1
tower-http         0.6.6   0.6.7      0.6.7  0.6.7
tracing            0.1.41  0.1.43     0.1.43 0.1.43
tracing-subscriber 0.3.20  0.3.22     0.3.22 0.3.22
name                    old req compatible latest new req
====                    ======= ========== ====== =======
pulldown-cmark-to-cmark 21.0.0  21.1.0     21.1.0 21.1.0
```
2025-12-01 00:37:48 +00:00
Marco Ieni
de8202a67f Merge pull request #2965 from Kobzol/publish-environment
Add publish environment to deploy job
2025-11-25 10:47:21 +00:00
Jakub Beránek
8f277a0d39 Add publish environment to deploy job 2025-11-25 09:41:27 +01:00
Eric Huss
d63aeb6526 Merge pull request #2955 from ehuss/bump-version
Update to 0.5.1
2025-11-20 01:44:03 +00:00
Eric Huss
eb83d080f6 Update to 0.5.1 2025-11-19 17:36:49 -08:00
Eric Huss
710ec2755d Merge pull request #2932 from vitorfloriano/scrollbar-bg-transparent
Change scrollbar background to transparent
2025-11-20 01:22:36 +00:00
Eric Huss
5d64d0e5f2 Merge pull request #2953 from ehuss/fix-heading-nav-level
Fix heading nav level
2025-11-20 01:13:35 +00:00
Eric Huss
718ceecfa2 Fix heading nav depth
This fixes an issue where when a heading goes from a larger to a smaller
level, it was going back too far so that subsequent headings would be at
a lower level than they should have been.

Fixes https://github.com/rust-lang/mdBook/issues/2944
2025-11-19 17:06:49 -08:00
Eric Huss
09616e31af Add a test to validate the structure of the heading nav
This checks the entire structure of the heading nav for this test. It
currently is not handling nesting properly.

Having a large inline string like this may not be the easiest to
maintain or be able to see the structure. I don't see a way to format it
in goml.
2025-11-19 16:50:35 -08:00
Eric Huss
7e7a3b495e Merge pull request #2952 from ehuss/ignore-top-env-keys
Ignore invalid top-level environment variable config keys
2025-11-20 00:45:41 +00:00
Eric Huss
d39deca76a Ignore invalid top-level environment variable config keys
This changes it so that top-level environment variable config keys like
`MDBOOK_FOO` are ignored instead of generating an error. It's just too
inconvenient since it is common for users to set environment variables
like `MDBOOK_VERSION` or whatever for their own scripts.
2025-11-19 16:38:47 -08:00
Eric Huss
8385e750ec Merge pull request #2951 from ehuss/fa-improvements
Font Awesome fixes and improvements
2025-11-20 00:24:35 +00:00
Eric Huss
8571d70b52 Update the documentation for Font Awesome
This updates the documentation to try to improve the Font Awesome
support.
2025-11-19 16:15:53 -08:00
Eric Huss
4b5ea14ee1 Support new font-awesome class names
In version 6, Font Awesome changed so that the class names look like
`fa-solid fa-cat` instead of `fas fa-cat`. This updates so that it
handles this new style.
2025-11-19 16:04:34 -08:00
Eric Huss
c53379e3ac Add a test using full fontawesome type names
In version 6, Font Awesome changed so that the class names look like
`fa-solid fa-cat` instead of `fas fa-cat`. mdBook is not handling the
new style.
2025-11-19 15:56:54 -08:00
Vitor Floriano
ef10e720a5 Change scrollbar background to transparent
Closes #2930.
2025-11-12 18:16:31 -03:00
130 changed files with 607 additions and 180 deletions

View File

@@ -54,6 +54,7 @@ jobs:
permissions:
# Required for OIDC token exchange
id-token: write
environment: publish
steps:
- uses: actions/checkout@v5
- name: Install Rust (rustup)

View File

@@ -1,5 +1,41 @@
# 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)
@@ -75,7 +111,7 @@ The following is a summary of the changes that may require your attention when u
- 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 `<i>` tags. Additionally, a handlebars helper has been added for the `hbs` files.
- The font-awesome font is no longer loaded as a font. Instead, the corresponding SVG is embedded in the output for the corresponding `<i>` 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)

View File

@@ -221,7 +221,7 @@ Instructions for mdBook maintainers to publish a new release:
1. Create a PR that bumps the version and updates the changelog:
1. `git fetch upstream`
2. `git checkout -B bump-version upstream/master`
2. `git checkout -B bump-version upstream/master && git branch --set-upstream-to=origin/bump-version`
3. `cargo xtask bump <BUMP>`
- This will update the version of all the crates.
- `cargo set-version` must first be installed with `cargo install cargo-edit`.

270
Cargo.lock generated
View File

@@ -52,18 +52,18 @@ dependencies = [
[[package]]
name = "anstyle-query"
version = "1.1.4"
version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
"windows-sys 0.60.2",
"windows-sys 0.61.2",
]
[[package]]
name = "anstyle-svg"
version = "0.1.11"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26b9ec8c976eada1b0f9747a3d7cc4eae3bef10613e443746e7487f26c872fde"
checksum = "e22d9f3dea8bbda97c75bd0f0203e23f1e190d6d6f27a40e10063946dc4d4362"
dependencies = [
"anstyle",
"anstyle-lossy",
@@ -74,13 +74,13 @@ dependencies = [
[[package]]
name = "anstyle-wincon"
version = "3.0.10"
version = "3.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a"
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
"windows-sys 0.60.2",
"windows-sys 0.61.2",
]
[[package]]
@@ -97,9 +97,9 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "axum"
version = "0.8.6"
version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a18ed336352031311f4e0b4dd2ff392d4fbb370777c9d18d7fc9d7359f73871"
checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425"
dependencies = [
"axum-core",
"base64",
@@ -205,9 +205,9 @@ dependencies = [
[[package]]
name = "bytes"
version = "1.10.1"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
[[package]]
name = "cfg-if"
@@ -217,18 +217,18 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "clap"
version = "4.5.51"
version = "4.5.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5"
checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
version = "4.5.51"
version = "4.5.53"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a"
checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00"
dependencies = [
"anstream",
"anstyle",
@@ -239,9 +239,9 @@ dependencies = [
[[package]]
name = "clap_complete"
version = "4.5.60"
version = "4.5.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e602857739c5a4291dfa33b5a298aeac9006185229a700e5810a3ef7272d971"
checksum = "39615915e2ece2550c0149addac32fb5bd312c657f43845bb9088cb9c8a7c992"
dependencies = [
"clap",
]
@@ -303,9 +303,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-common"
version = "0.1.6"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
dependencies = [
"generic-array",
"typenum",
@@ -332,7 +332,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -343,7 +343,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead"
dependencies = [
"darling_core",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -370,7 +370,7 @@ dependencies = [
"darling",
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -380,7 +380,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c"
dependencies = [
"derive_builder_core",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -514,7 +514,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -546,9 +546,9 @@ dependencies = [
[[package]]
name = "generic-array"
version = "0.14.9"
version = "0.14.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2"
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
dependencies = [
"typenum",
"version_check",
@@ -624,9 +624,9 @@ dependencies = [
[[package]]
name = "hashbrown"
version = "0.16.0"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
[[package]]
name = "hex"
@@ -659,23 +659,21 @@ dependencies = [
[[package]]
name = "html5ever"
version = "0.35.0"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55d958c2f74b664487a2035fe1dadb032c48718a03b63f3ab0b8537db8549ed4"
checksum = "6452c4751a24e1b99c3260d505eaeee76a050573e61f30ac2c924ddc7236f01e"
dependencies = [
"log",
"markup5ever 0.35.0",
"match_token",
"markup5ever 0.36.1",
]
[[package]]
name = "http"
version = "1.3.1"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565"
checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
dependencies = [
"bytes",
"fnv",
"itoa",
]
@@ -722,9 +720,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
[[package]]
name = "hyper"
version = "1.7.0"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e"
checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11"
dependencies = [
"atomic-waker",
"bytes",
@@ -743,9 +741,9 @@ dependencies = [
[[package]]
name = "hyper-util"
version = "0.1.17"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8"
checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56"
dependencies = [
"bytes",
"futures-core",
@@ -781,9 +779,9 @@ dependencies = [
[[package]]
name = "indexmap"
version = "2.12.0"
version = "2.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2"
dependencies = [
"equivalent",
"hashbrown",
@@ -900,16 +898,16 @@ dependencies = [
"log",
"phf 0.10.1",
"phf_codegen 0.10.0",
"string_cache",
"string_cache_codegen",
"string_cache 0.8.9",
"string_cache_codegen 0.5.4",
"tendril",
]
[[package]]
name = "markup5ever"
version = "0.35.0"
version = "0.36.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "311fe69c934650f8f19652b3946075f0fc41ad8757dbb68f1ca14e7900ecc1c3"
checksum = "6c3294c4d74d0742910f8c7b466f44dda9eb2d5742c1e430138df290a1e8451c"
dependencies = [
"log",
"tendril",
@@ -928,17 +926,6 @@ dependencies = [
"xml5ever",
]
[[package]]
name = "match_token"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac84fd3f360fcc43dc5f5d186f02a94192761a080e8bc58621ad4d12296a58cf"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.108",
]
[[package]]
name = "matchers"
version = "0.2.0"
@@ -956,7 +943,7 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"
[[package]]
name = "mdbook"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"anyhow",
"axum",
@@ -996,7 +983,7 @@ version = "0.0.0"
[[package]]
name = "mdbook-core"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"anyhow",
"regex",
@@ -1009,7 +996,7 @@ dependencies = [
[[package]]
name = "mdbook-driver"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"anyhow",
"indexmap",
@@ -1031,7 +1018,7 @@ dependencies = [
[[package]]
name = "mdbook-html"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"anyhow",
"ego-tree",
@@ -1039,7 +1026,7 @@ dependencies = [
"font-awesome-as-a-crate",
"handlebars",
"hex",
"html5ever 0.35.0",
"html5ever 0.36.1",
"indexmap",
"mdbook-core",
"mdbook-markdown",
@@ -1056,7 +1043,7 @@ dependencies = [
[[package]]
name = "mdbook-markdown"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"pulldown-cmark",
"regex",
@@ -1065,7 +1052,7 @@ dependencies = [
[[package]]
name = "mdbook-preprocessor"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"anyhow",
"mdbook-core",
@@ -1085,7 +1072,7 @@ dependencies = [
[[package]]
name = "mdbook-renderer"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"anyhow",
"mdbook-core",
@@ -1095,7 +1082,7 @@ dependencies = [
[[package]]
name = "mdbook-summary"
version = "0.5.0"
version = "0.5.2"
dependencies = [
"anyhow",
"mdbook-core",
@@ -1280,9 +1267,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"
[[package]]
name = "pest"
version = "2.8.3"
version = "2.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "989e7521a040efde50c3ab6bbadafbe15ab6dc042686926be59ac35d74607df4"
checksum = "cbcfd20a6d4eeba40179f05735784ad32bdaef05ce8e8af05f180d45bb3e7e22"
dependencies = [
"memchr",
"ucd-trie",
@@ -1290,9 +1277,9 @@ dependencies = [
[[package]]
name = "pest_derive"
version = "2.8.3"
version = "2.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "187da9a3030dbafabbbfb20cb323b976dc7b7ce91fcd84f2f74d6e31d378e2de"
checksum = "51f72981ade67b1ca6adc26ec221be9f463f2b5839c7508998daa17c23d94d7f"
dependencies = [
"pest",
"pest_generator",
@@ -1300,22 +1287,22 @@ dependencies = [
[[package]]
name = "pest_generator"
version = "2.8.3"
version = "2.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49b401d98f5757ebe97a26085998d6c0eecec4995cad6ab7fc30ffdf4b052843"
checksum = "dee9efd8cdb50d719a80088b76f81aec7c41ed6d522ee750178f83883d271625"
dependencies = [
"pest",
"pest_meta",
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
name = "pest_meta"
version = "2.8.3"
version = "2.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72f27a2cfee9f9039c4d86faa5af122a0ac3851441a34865b8a043b46be0065a"
checksum = "bf1d70880e76bdc13ba52eafa6239ce793d85c8e43896507e43dd8984ff05b82"
dependencies = [
"pest",
"sha2",
@@ -1332,11 +1319,12 @@ dependencies = [
[[package]]
name = "phf"
version = "0.11.3"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078"
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
dependencies = [
"phf_shared 0.11.3",
"phf_shared 0.13.1",
"serde",
]
[[package]]
@@ -1351,12 +1339,12 @@ dependencies = [
[[package]]
name = "phf_codegen"
version = "0.11.3"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a"
checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
dependencies = [
"phf_generator 0.11.3",
"phf_shared 0.11.3",
"phf_generator 0.13.1",
"phf_shared 0.13.1",
]
[[package]]
@@ -1379,6 +1367,16 @@ dependencies = [
"rand 0.8.5",
]
[[package]]
name = "phf_generator"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
dependencies = [
"fastrand",
"phf_shared 0.13.1",
]
[[package]]
name = "phf_shared"
version = "0.10.0"
@@ -1397,6 +1395,15 @@ dependencies = [
"siphasher 1.0.1",
]
[[package]]
name = "phf_shared"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
dependencies = [
"siphasher 1.0.1",
]
[[package]]
name = "pin-project-lite"
version = "0.2.16"
@@ -1453,18 +1460,18 @@ checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae"
[[package]]
name = "pulldown-cmark-to-cmark"
version = "21.0.0"
version = "21.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5b6a0769a491a08b31ea5c62494a8f144ee0987d86d670a8af4df1e1b7cde75"
checksum = "8246feae3db61428fd0bb94285c690b460e4517d83152377543ca802357785f1"
dependencies = [
"pulldown-cmark",
]
[[package]]
name = "quote"
version = "1.0.41"
version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
dependencies = [
"proc-macro2",
]
@@ -1650,7 +1657,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -1819,6 +1826,19 @@ dependencies = [
"serde",
]
[[package]]
name = "string_cache"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901"
dependencies = [
"new_debug_unreachable",
"parking_lot",
"phf_shared 0.13.1",
"precomputed-hash",
"serde",
]
[[package]]
name = "string_cache_codegen"
version = "0.5.4"
@@ -1831,6 +1851,18 @@ dependencies = [
"quote",
]
[[package]]
name = "string_cache_codegen"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69"
dependencies = [
"phf_generator 0.13.1",
"phf_shared 0.13.1",
"proc-macro2",
"quote",
]
[[package]]
name = "strsim"
version = "0.11.1"
@@ -1850,9 +1882,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.108"
version = "2.0.111"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87"
dependencies = [
"proc-macro2",
"quote",
@@ -1916,7 +1948,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -1951,7 +1983,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
@@ -1968,9 +2000,9 @@ dependencies = [
[[package]]
name = "tokio-util"
version = "0.7.16"
version = "0.7.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5"
checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594"
dependencies = [
"bytes",
"futures-core",
@@ -2042,9 +2074,9 @@ dependencies = [
[[package]]
name = "tower-http"
version = "0.6.6"
version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456"
dependencies = [
"bitflags 2.10.0",
"bytes",
@@ -2080,9 +2112,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]]
name = "tracing"
version = "0.1.41"
version = "0.1.43"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647"
dependencies = [
"log",
"pin-project-lite",
@@ -2092,20 +2124,20 @@ dependencies = [
[[package]]
name = "tracing-attributes"
version = "0.1.30"
version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]
[[package]]
name = "tracing-core"
version = "0.1.34"
version = "0.1.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c"
dependencies = [
"once_cell",
"valuable",
@@ -2124,9 +2156,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
version = "0.3.20"
version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
dependencies = [
"matchers",
"nu-ansi-term",
@@ -2195,9 +2227,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
[[package]]
name = "utf8-width"
version = "0.1.7"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3"
checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091"
[[package]]
name = "utf8parse"
@@ -2244,14 +2276,14 @@ dependencies = [
[[package]]
name = "web_atoms"
version = "0.1.3"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57ffde1dc01240bdf9992e3205668b235e59421fd085e8a317ed98da0178d414"
checksum = "acd0c322f146d0f8aad130ce6c187953889359584497dac6561204c8e17bb43d"
dependencies = [
"phf 0.11.3",
"phf_codegen 0.11.3",
"string_cache",
"string_cache_codegen",
"phf 0.13.1",
"phf_codegen 0.13.1",
"string_cache 0.9.0",
"string_cache_codegen 0.6.1",
]
[[package]]
@@ -2354,9 +2386,9 @@ checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]]
name = "winnow"
version = "0.7.13"
version = "0.7.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf"
checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
[[package]]
name = "wit-bindgen"
@@ -2381,20 +2413,20 @@ version = "0.0.0"
[[package]]
name = "zerocopy"
version = "0.8.27"
version = "0.8.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.8.27"
version = "0.8.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.108",
"syn 2.0.111",
]

View File

@@ -26,9 +26,9 @@ rust-version = "1.88.0" # Keep in sync with installation.md and .github/workflow
[workspace.dependencies]
anyhow = "1.0.100"
axum = "0.8.6"
clap = { version = "4.5.51", features = ["cargo", "wrap_help"] }
clap_complete = "4.5.60"
axum = "0.8.7"
clap = { version = "4.5.53", features = ["cargo", "wrap_help"] }
clap_complete = "4.5.61"
ego-tree = "0.10.0"
elasticlunr-rs = "3.0.2"
font-awesome-as-a-crate = "0.3.0"
@@ -36,16 +36,16 @@ futures-util = "0.3.31"
glob = "0.3.3"
handlebars = "6.3.2"
hex = "0.4.3"
html5ever = "0.35.0"
indexmap = "2.12.0"
html5ever = "0.36.0"
indexmap = "2.12.1"
ignore = "0.4.25"
mdbook-core = { path = "crates/mdbook-core", version = "0.5.0" }
mdbook-driver = { path = "crates/mdbook-driver", version = "0.5.0" }
mdbook-html = { path = "crates/mdbook-html", version = "0.5.0" }
mdbook-markdown = { path = "crates/mdbook-markdown", version = "0.5.0" }
mdbook-preprocessor = { path = "crates/mdbook-preprocessor", version = "0.5.0" }
mdbook-renderer = { path = "crates/mdbook-renderer", version = "0.5.0" }
mdbook-summary = { path = "crates/mdbook-summary", version = "0.5.0" }
mdbook-core = { path = "crates/mdbook-core", version = "0.5.2" }
mdbook-driver = { path = "crates/mdbook-driver", version = "0.5.2" }
mdbook-html = { path = "crates/mdbook-html", version = "0.5.2" }
mdbook-markdown = { path = "crates/mdbook-markdown", version = "0.5.2" }
mdbook-preprocessor = { path = "crates/mdbook-preprocessor", version = "0.5.2" }
mdbook-renderer = { path = "crates/mdbook-renderer", version = "0.5.2" }
mdbook-summary = { path = "crates/mdbook-summary", version = "0.5.2" }
memchr = "2.7.6"
notify = "8.2.0"
notify-debouncer-mini = "0.7.0"
@@ -64,14 +64,14 @@ tempfile = "3.23.0"
tokio = "1.48.0"
toml = "0.9.8"
topological-sort = "0.2.2"
tower-http = "0.6.6"
tracing = "0.1.41"
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
tower-http = "0.6.7"
tracing = "0.1.43"
tracing-subscriber = { version = "0.3.22", features = ["env-filter"] }
walkdir = "2.5.0"
[package]
name = "mdbook"
version = "0.5.0"
version = "0.5.2"
authors = [
"Mathieu David <mathieudavid@mathieudavid.org>",
"Michael-F-Bryan <michaelfbryan@gmail.com>",

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-core"
version = "0.5.0"
version = "0.5.2"
description = "The base support library for mdbook, intended for internal use only"
edition.workspace = true
license.workspace = true

View File

@@ -43,6 +43,7 @@
//! # run().unwrap()
//! ```
use crate::static_regex;
use crate::utils::{TomlExt, fs, log_backtrace};
use anyhow::{Context, Error, Result, bail};
use serde::{Deserialize, Serialize};
@@ -149,15 +150,23 @@ impl Config {
pub fn update_from_env(&mut self) -> Result<()> {
debug!("Updating the config from environment variables");
static_regex!(
VALID_KEY,
r"^(:?book|build|rust|output|preprocessor)(:?$|\.)"
);
let overrides =
env::vars().filter_map(|(key, value)| parse_env(&key).map(|index| (index, value)));
for (key, value) in overrides {
if key == "log" {
// MDBOOK_LOG is used to control logging.
trace!("{} => {}", key, value);
if !VALID_KEY.is_match(&key) {
// Ignore environment variables for other top-level things.
// This allows users to set things like `MDBOOK_VERSION` or
// `MDBOOK_DOWNLOAD_URL` for their own scripts and not
// interfere with how the config is loaded.
continue;
}
trace!("{} => {}", key, value);
let parsed_value = serde_json::from_str(&value)
.unwrap_or_else(|_| serde_json::Value::String(value.to_string()));

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-driver"
version = "0.5.0"
version = "0.5.2"
description = "High-level library for running mdBook"
edition.workspace = true
license.workspace = true

View File

@@ -20,7 +20,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use tempfile::Builder as TempFileBuilder;
use topological_sort::TopologicalSort;
use tracing::{debug, error, info, trace, warn};
use tracing::{debug, info, trace, warn};
#[cfg(test)]
mod tests;
@@ -263,11 +263,6 @@ impl MDBook {
}
}
// Index Preprocessor is disabled so that chapter paths
// continue to point to the actual markdown files.
self.preprocessors = determine_preprocessors(&self.config, &self.root)?;
self.preprocessors
.shift_remove_entry(IndexPreprocessor::NAME);
let (book, _) = self.preprocess_book(&TestRenderer)?;
let color_output = std::io::stderr().is_terminal();
@@ -329,8 +324,8 @@ impl MDBook {
if !output.status.success() {
failed = true;
error!(
"rustdoc returned an error:\n\
eprintln!(
"ERROR rustdoc returned an error:\n\
\n--- stdout\n{}\n--- stderr\n{}",
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-html"
version = "0.5.0"
version = "0.5.2"
description = "mdBook HTML renderer"
edition.workspace = true
license.workspace = true

View File

@@ -1,7 +1,7 @@
/* CSS for UI elements (a.k.a. chrome) */
html {
scrollbar-color: var(--scrollbar) var(--bg);
scrollbar-color: var(--scrollbar) transparent;
}
#mdbook-searchresults a,
.content a:link,

View File

@@ -40,14 +40,22 @@ class MDBookSidebarScrollbox extends HTMLElement {
// Track and set sidebar scroll position
this.addEventListener('click', e => {
if (e.target.tagName === 'A') {
sessionStorage.setItem('sidebar-scroll', this.scrollTop);
const clientRect = e.target.getBoundingClientRect();
const sidebarRect = this.getBoundingClientRect();
sessionStorage.setItem('sidebar-scroll-offset', clientRect.top - sidebarRect.top);
}
}, { passive: true });
const sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
sessionStorage.removeItem('sidebar-scroll');
if (sidebarScrollTop) {
const sidebarScrollOffset = sessionStorage.getItem('sidebar-scroll-offset');
sessionStorage.removeItem('sidebar-scroll-offset');
if (sidebarScrollOffset !== null) {
// preserve sidebar scroll position when navigating via links within sidebar
this.scrollTop = sidebarScrollTop;
const activeSection = this.querySelector('.active');
if (activeSection) {
const clientRect = activeSection.getBoundingClientRect();
const sidebarRect = this.getBoundingClientRect();
const currentOffset = clientRect.top - sidebarRect.top;
this.scrollTop += currentOffset - parseFloat(sidebarScrollOffset);
}
} else {
// scroll sidebar to current active section when navigating via
// 'next/previous chapter' buttons
@@ -392,7 +400,7 @@ window.customElements.define('mdbook-sidebar-scrollbox', MDBookSidebarScrollbox)
stack.push({level: nextLevel, ol: ol});
}
} else if (level < currentLevel) {
while (stack.length > 1 && stack[stack.length - 1].level >= level) {
while (stack.length > 1 && stack[stack.length - 1].level > level) {
stack.pop();
}
}

View File

@@ -1030,14 +1030,14 @@ where
let i_el = node.value().as_element().unwrap();
let classes = i_el.attr("class").unwrap_or_default();
for class in classes.split(" ") {
if let Some(class) = class.strip_prefix("fa-") {
icon = class.to_owned();
} else if class == "fa" {
if matches!(class, "fa" | "fa-regular") {
type_ = fa::Type::Regular;
} else if class == "fas" {
} else if matches!(class, "fas" | "fa-solid") {
type_ = fa::Type::Solid;
} else if class == "fab" {
} else if matches!(class, "fab" | "fa-brands") {
type_ = fa::Type::Brands;
} else if let Some(class) = class.strip_prefix("fa-") {
icon = class.to_owned();
} else {
new_classes += " ";
new_classes += class;

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-markdown"
version = "0.5.0"
version = "0.5.2"
description = "Markdown processing used in mdBook"
edition.workspace = true
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-preprocessor"
version = "0.5.0"
version = "0.5.2"
description = "Library to assist implementing an mdBook preprocessor"
edition.workspace = true
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-renderer"
version = "0.5.0"
version = "0.5.2"
description = "Library to assist implementing an mdBook renderer"
edition.workspace = true
license.workspace = true

View File

@@ -1,6 +1,6 @@
[package]
name = "mdbook-summary"
version = "0.5.0"
version = "0.5.2"
description = "Summary parser for mdBook"
edition.workspace = true
license.workspace = true

View File

@@ -49,7 +49,7 @@ By pulling in `mdbook-preprocessor` as a library, preprocessors can have access
existing infrastructure for dealing with books.
For example, a custom preprocessor could use the
[`CmdPreprocessor::parse_input()`] function to deserialize the JSON written to
[`parse_input()`] function to deserialize the JSON written to
`stdin`. Then each chapter of the `Book` can be mutated in-place via
[`Book::for_each_mut()`], and then written to `stdout` with the `serde_json`
crate.
@@ -101,7 +101,7 @@ if __name__ == '__main__':
[pc]: https://crates.io/crates/pulldown-cmark
[pctc]: https://crates.io/crates/pulldown-cmark-to-cmark
[an example no-op preprocessor]: https://github.com/rust-lang/mdBook/blob/master/examples/nop-preprocessor.rs
[`CmdPreprocessor::parse_input()`]: https://docs.rs/mdbook-preprocessor/latest/mdbook_preprocessor/trait.Preprocessor.html#method.parse_input
[`parse_input()`]: https://docs.rs/mdbook-preprocessor/latest/mdbook_preprocessor/fn.parse_input.html
[`Book::for_each_mut()`]: https://docs.rs/mdbook-preprocessor/latest/mdbook_preprocessor/book/struct.Book.html#method.for_each_mut
[`PreprocessorContext`]: https://docs.rs/mdbook-preprocessor/latest/mdbook_preprocessor/struct.PreprocessorContext.html
[`Book`]: https://docs.rs/mdbook-preprocessor/latest/mdbook_preprocessor/book/struct.Book.html

View File

@@ -143,9 +143,7 @@ The following configuration options are available:
those labels. Defaults to `false`.
- **git-repository-url:** A url to the git repository for the book. If provided
an icon link will be output in the menu bar of the book.
- **git-repository-icon:** The FontAwesome icon class to use for the git
repository link. Defaults to `fab-github` which looks like <i class="fa fab-github"></i>.
If you are not using GitHub, another option to consider is `fa-code-fork` which looks like <i class="fas fa-code-fork"></i>.
- **git-repository-icon:** The Font Awesome icon class to use for the git repository link. Defaults to `fab-github` which looks like <i class="fab fa-github"></i>. If you are not using GitHub, another option to consider is `fas-code-fork` which looks like <i class="fas fa-code-fork"></i>. The start of the string should be `fa-` for regular icons, `fas-` for solid icons, or `fab-` for brand icons. See the [free icon set](https://fontawesome.com/v6/search) for the available icons.
- **edit-url-template:** Edit url template, when provided shows a
"Suggest an edit" button (which looks like <i class="fas fa-pencil"></i>) for directly jumping to editing the currently
viewed page. For e.g. GitHub projects set this to

View File

@@ -340,7 +340,7 @@ HTML tags with class `hidden` will not be shown.
## Font-Awesome icons
mdBook includes a copy of [Font Awesome Free's](https://fontawesome.com)
mdBook includes a copy of version 6 of [Font Awesome Free's](https://fontawesome.com)
MIT-licensed SVG files. It emulates the `<i>` syntax, but converts the results
to inline SVG. Only the regular, solid, and brands icons are included; paid
features like the light icons are not.
@@ -348,7 +348,9 @@ features like the light icons are not.
For example, given this HTML syntax:
```hbs
The result looks like this: <i class="fas fa-print"></i>
The result looks like this: <i class="fa-solid fa-print"></i>
```
The result looks like this: <i class="fas fa-print"></i>
The result looks like this: <i class="fa-solid fa-print"></i>
See the [free icon set](https://fontawesome.com/v6/search) for the available icons.

View File

@@ -95,7 +95,7 @@ MIT-licensed SVG files. It accepts three positional arguments:
1. Type: one of "solid", "regular", and "brands" (light and duotone are not
currently supported)
2. Icon: anything chosen from the
[free icon set](https://fontawesome.com/icons?d=gallery&m=free)
[free icon set](https://fontawesome.com/v6/search)
3. ID (optional): if included, an HTML ID attribute will be added to the
icon's wrapping `<span>` tag

View File

@@ -41,7 +41,6 @@ pub fn rebuild_on_change(
loop {
std::thread::sleep(Duration::new(1, 0));
watcher.set_roots(&book);
let start = Instant::now();
let paths = watcher.scan();
let elapsed = start.elapsed().as_secs_f64();
@@ -67,6 +66,7 @@ pub fn rebuild_on_change(
post_build();
}
book = b;
watcher.set_roots(&book);
}
Err(e) => error!("failed to load book config: {e:?}"),
}

View File

@@ -0,0 +1,3 @@
[book]
title = "sidebar-scroll"
language = "en"

View File

@@ -0,0 +1,102 @@
# Summary
- [Chapter 1](./chapter_1.md)
- [Chapter 2](./chapter_2.md)
- [Chapter 3](./chapter_3.md)
- [Chapter 4](./chapter_4.md)
- [Chapter 5](./chapter_5.md)
- [Chapter 6](./chapter_6.md)
- [Chapter 7](./chapter_7.md)
- [Chapter 8](./chapter_8.md)
- [Chapter 9](./chapter_9.md)
- [Chapter 10](./chapter_10.md)
- [Chapter 11](./chapter_11.md)
- [Chapter 12](./chapter_12.md)
- [Chapter 13](./chapter_13.md)
- [Chapter 14](./chapter_14.md)
- [Chapter 15](./chapter_15.md)
- [Chapter 16](./chapter_16.md)
- [Chapter 17](./chapter_17.md)
- [Chapter 18](./chapter_18.md)
- [Chapter 19](./chapter_19.md)
- [Chapter 20](./chapter_20.md)
- [Chapter 21](./chapter_21.md)
- [Chapter 22](./chapter_22.md)
- [Chapter 23](./chapter_23.md)
- [Chapter 24](./chapter_24.md)
- [Chapter 25](./chapter_25.md)
- [Chapter 26](./chapter_26.md)
- [Chapter 27](./chapter_27.md)
- [Chapter 28](./chapter_28.md)
- [Chapter 29](./chapter_29.md)
- [Chapter 30](./chapter_30.md)
- [Chapter 31](./chapter_31.md)
- [Chapter 32](./chapter_32.md)
- [Chapter 33](./chapter_33.md)
- [Chapter 34](./chapter_34.md)
- [Chapter 35](./chapter_35.md)
- [Chapter 36](./chapter_36.md)
- [Chapter 37](./chapter_37.md)
- [Chapter 38](./chapter_38.md)
- [Chapter 39](./chapter_39.md)
- [Chapter 40](./chapter_40.md)
- [Chapter 41](./chapter_41.md)
- [Chapter 42](./chapter_42.md)
- [Chapter 43](./chapter_43.md)
- [Chapter 44](./chapter_44.md)
- [Chapter 45](./chapter_45.md)
- [Chapter 46](./chapter_46.md)
- [Chapter 47](./chapter_47.md)
- [Chapter 48](./chapter_48.md)
- [Chapter 49](./chapter_49.md)
- [Chapter 50](./chapter_50.md)
- [Chapter 51](./chapter_51.md)
- [Chapter 52](./chapter_52.md)
- [Chapter 53](./chapter_53.md)
- [Chapter 54](./chapter_54.md)
- [Chapter 55](./chapter_55.md)
- [Chapter 56](./chapter_56.md)
- [Chapter 57](./chapter_57.md)
- [Chapter 58](./chapter_58.md)
- [Chapter 59](./chapter_59.md)
- [Chapter 60](./chapter_60.md)
- [Chapter 61](./chapter_61.md)
- [Chapter 62](./chapter_62.md)
- [Chapter 63](./chapter_63.md)
- [Chapter 64](./chapter_64.md)
- [Chapter 65](./chapter_65.md)
- [Chapter 66](./chapter_66.md)
- [Chapter 67](./chapter_67.md)
- [Chapter 68](./chapter_68.md)
- [Chapter 69](./chapter_69.md)
- [Chapter 70](./chapter_70.md)
- [Chapter 71](./chapter_71.md)
- [Chapter 72](./chapter_72.md)
- [Chapter 73](./chapter_73.md)
- [Chapter 74](./chapter_74.md)
- [Chapter 75](./chapter_75.md)
- [Chapter 76](./chapter_76.md)
- [Chapter 77](./chapter_77.md)
- [Chapter 78](./chapter_78.md)
- [Chapter 79](./chapter_79.md)
- [Chapter 80](./chapter_80.md)
- [Chapter 81](./chapter_81.md)
- [Chapter 82](./chapter_82.md)
- [Chapter 83](./chapter_83.md)
- [Chapter 84](./chapter_84.md)
- [Chapter 85](./chapter_85.md)
- [Chapter 86](./chapter_86.md)
- [Chapter 87](./chapter_87.md)
- [Chapter 88](./chapter_88.md)
- [Chapter 89](./chapter_89.md)
- [Chapter 90](./chapter_90.md)
- [Chapter 91](./chapter_91.md)
- [Chapter 92](./chapter_92.md)
- [Chapter 93](./chapter_93.md)
- [Chapter 94](./chapter_94.md)
- [Chapter 95](./chapter_95.md)
- [Chapter 96](./chapter_96.md)
- [Chapter 97](./chapter_97.md)
- [Chapter 98](./chapter_98.md)
- [Chapter 99](./chapter_99.md)
- [Chapter 100](./chapter_100.md)

View File

@@ -0,0 +1,3 @@
# Chapter 1
## This has a single heading

View File

@@ -0,0 +1,28 @@
# Chapter 10
## Heading A
## Heading B
## Heading C
## Heading D
## Heading E
## Heading F
## Heading G
## Heading H
## Heading I
## Heading J
## Heading K
## Heading L
## Heading M
## Heading N
## Heading O
## Heading P
## Heading Q
## Heading R
## Heading S
## Heading T
## Heading U
## Heading V
## Heading W
## Heading X
## Heading Y
## Heading Z

View File

@@ -0,0 +1 @@
# Chapter 100

View File

@@ -0,0 +1 @@
# Chapter 11

View File

@@ -0,0 +1 @@
# Chapter 12

View File

@@ -0,0 +1 @@
# Chapter 13

View File

@@ -0,0 +1 @@
# Chapter 14

View File

@@ -0,0 +1 @@
# Chapter 15

View File

@@ -0,0 +1 @@
# Chapter 16

View File

@@ -0,0 +1 @@
# Chapter 17

View File

@@ -0,0 +1 @@
# Chapter 18

View File

@@ -0,0 +1 @@
# Chapter 19

View File

@@ -0,0 +1 @@
# Chapter 2

View File

@@ -0,0 +1 @@
# Chapter 20

View File

@@ -0,0 +1 @@
# Chapter 21

View File

@@ -0,0 +1 @@
# Chapter 22

View File

@@ -0,0 +1 @@
# Chapter 23

View File

@@ -0,0 +1 @@
# Chapter 24

View File

@@ -0,0 +1 @@
# Chapter 25

View File

@@ -0,0 +1 @@
# Chapter 26

View File

@@ -0,0 +1 @@
# Chapter 27

View File

@@ -0,0 +1 @@
# Chapter 28

View File

@@ -0,0 +1 @@
# Chapter 29

View File

@@ -0,0 +1 @@
# Chapter 3

View File

@@ -0,0 +1 @@
# Chapter 30

View File

@@ -0,0 +1 @@
# Chapter 31

View File

@@ -0,0 +1 @@
# Chapter 32

View File

@@ -0,0 +1 @@
# Chapter 33

View File

@@ -0,0 +1 @@
# Chapter 34

View File

@@ -0,0 +1,28 @@
# Chapter 35
## Heading A
## Heading B
## Heading C
## Heading D
## Heading E
## Heading F
## Heading G
## Heading H
## Heading I
## Heading J
## Heading K
## Heading L
## Heading M
## Heading N
## Heading O
## Heading P
## Heading Q
## Heading R
## Heading S
## Heading T
## Heading U
## Heading V
## Heading W
## Heading X
## Heading Y
## Heading Z

View File

@@ -0,0 +1 @@
# Chapter 36

View File

@@ -0,0 +1 @@
# Chapter 37

View File

@@ -0,0 +1 @@
# Chapter 38

View File

@@ -0,0 +1 @@
# Chapter 39

View File

@@ -0,0 +1 @@
# Chapter 4

View File

@@ -0,0 +1 @@
# Chapter 40

View File

@@ -0,0 +1 @@
# Chapter 41

View File

@@ -0,0 +1 @@
# Chapter 42

View File

@@ -0,0 +1 @@
# Chapter 43

View File

@@ -0,0 +1 @@
# Chapter 44

View File

@@ -0,0 +1 @@
# Chapter 45

View File

@@ -0,0 +1 @@
# Chapter 46

View File

@@ -0,0 +1 @@
# Chapter 47

View File

@@ -0,0 +1 @@
# Chapter 48

View File

@@ -0,0 +1 @@
# Chapter 49

View File

@@ -0,0 +1 @@
# Chapter 5

View File

@@ -0,0 +1 @@
# Chapter 50

View File

@@ -0,0 +1 @@
# Chapter 51

View File

@@ -0,0 +1 @@
# Chapter 52

View File

@@ -0,0 +1 @@
# Chapter 53

View File

@@ -0,0 +1 @@
# Chapter 54

View File

@@ -0,0 +1 @@
# Chapter 55

View File

@@ -0,0 +1 @@
# Chapter 56

View File

@@ -0,0 +1 @@
# Chapter 57

View File

@@ -0,0 +1 @@
# Chapter 58

View File

@@ -0,0 +1 @@
# Chapter 59

View File

@@ -0,0 +1 @@
# Chapter 6

View File

@@ -0,0 +1 @@
# Chapter 60

View File

@@ -0,0 +1 @@
# Chapter 61

View File

@@ -0,0 +1 @@
# Chapter 62

View File

@@ -0,0 +1 @@
# Chapter 63

View File

@@ -0,0 +1 @@
# Chapter 64

View File

@@ -0,0 +1 @@
# Chapter 65

View File

@@ -0,0 +1 @@
# Chapter 66

View File

@@ -0,0 +1 @@
# Chapter 67

View File

@@ -0,0 +1 @@
# Chapter 68

View File

@@ -0,0 +1 @@
# Chapter 69

View File

@@ -0,0 +1 @@
# Chapter 7

View File

@@ -0,0 +1 @@
# Chapter 70

View File

@@ -0,0 +1 @@
# Chapter 71

View File

@@ -0,0 +1 @@
# Chapter 72

View File

@@ -0,0 +1 @@
# Chapter 73

View File

@@ -0,0 +1 @@
# Chapter 74

View File

@@ -0,0 +1 @@
# Chapter 75

View File

@@ -0,0 +1 @@
# Chapter 76

View File

@@ -0,0 +1 @@
# Chapter 77

Some files were not shown because too many files have changed in this diff Show More