3313 Commits
Author SHA1 Message Date
Guillaume Gomez afe6eb8836 Merge pull request #3093 from Ericson2314/socket-activation
Support socket activation for `mdbook serve`
2026-09-15 13:54:59 +00:00
Guillaume Gomez 02b270b5df Merge pull request #3219 from pinage404/definition_list_fix_chrome
fix: definition list in Chrome
2026-09-15 11:50:52 +00:00
Guillaume Gomez a4ada52c0c Merge pull request #3218 from dalance/fix/playground-selector
Fix playground selector
2026-09-15 09:35:51 +00:00
Guillaume Gomez e18773a967 Merge pull request #2706 from roberth/canonical-site-url
Add `canonical-site-url` setting
2026-09-15 09:33:46 +00:00
Robert Hensing c734580274 Add canonical-site-url setting
Based on the conversation in https://github.com/rust-lang/mdBook/issues/1238,
this implements the suggestion by markhildreth to implement such a setting.

I've additionally infixed `-site-` to highlight the relationship with the
`site-url`, and to distinguish it from the canonical URL as it occurs in a
page.
2026-09-15 00:29:38 +02:00
Guillaume Gomez b622cc4b03 Merge pull request #3222 from mmustafasenoglu/fix/cross-platform-path-separator
fix: normalize path separators for cross-platform resource lookup
2026-09-14 12:43:20 +00:00
Mustafa Senoglu 8e1f9cd110 fix: normalize path separators for cross-platform resource lookup
The {{ resource }} directive in templates uses / as separator, but Path::join on Windows produces \. This caused hash map lookups to fail on Windows when templates use forward slashes (or vice versa).

Add normalize_path() to normalize filenames to forward slashes when registering static files and when resolving resource directives.

Fixes #3221

Signed-off-by: Mustafa Senoglu <mmustafasenoglu0@gmail.com>
2026-09-14 14:34:29 +03:00
Guillaume Gomez c7f2b6068b Merge pull request #3144 from decathorpe/master
mdbook-html: Account for licenses of bundled JavaScript libraries and artwork
2026-09-14 10:55:55 +00:00
pinage404 fd391c8a27 fix: definition list in Chrome 2026-09-09 17:40:54 +02:00
dalance 536a5aa965 Add playground test 2026-09-09 14:40:19 +09:00
dalance eecc8a3c19 Fix playground selector 2026-09-09 14:11:33 +09:00
Guillaume Gomez 6a75867463 Merge pull request #3160 from coyaSONG/agent/playground-editable-coverage
test: cover editable playground includes
2026-09-08 15:37:28 +00:00
Guillaume Gomez 4fb9ea9bb3 Merge pull request #3141 from hollow-owl/invalid-default-theme
Invalid default-theme and preferred-dark-theme now cause an error
2026-09-07 16:47:11 +00:00
hollow-owl eab9ae4f82 Add ui test 2026-09-07 11:40:29 -05:00
hollow-owl 5b62bb6f6d Make BuiltinTheme repr(usize) 2026-09-06 16:18:26 -05:00
John Ericson 160c0437ba Support socket activation for mdbook serve
Add a `--socket-activate` flag that adopts a pre-bound TCP listener
from `LISTEN_FDS` instead of binding a new one. This allows process
managers like foreman (with Socketfile support) or systemd to own the
socket, so it survives server restarts.

Three modes:
- `--socket-activate`: require a passed-in socket, fail if absent
- `--port N` / `--hostname H`: always bind, ignore `LISTEN_FDS`
- Neither: try `LISTEN_FDS` first, fall back to binding the default

The listener is now bound in the main thread before spawning the
server, so the actual address is always known for logging and
`--open`.

Also parse `--port` as `u16` at arg-parse time instead of leaving
it as a string.

Socket activation is normally associated with systemd. And indeed, it
would be peculiar to wire up this development command with systemd, but
it is also used in other contexts more appropriate to this command, like
https://github.com/mitsuhiko/systemfd, a development tool. From a
Capsicum/WASI perspective, it also is generally better when tools can
consume resources provided by a more privileged caller, rather than
having to open them themselves. For these reasons, I think everything
should support socket-activation.
2026-09-04 18:25:05 -04:00
Guillaume Gomez a57975d499 Merge pull request #3189 from VXNCXNX/fix/toc-index-chapter-highlight
fix: don't highlight the first chapter when another one is the index
2026-09-03 12:41:46 +00:00
VXNCXNX faa6618ab3 fix: don't highlight the first chapter when another one is the index
the sidebar treats the first chapter as an alias for index.html, but a README chapter placed later in SUMMARY.md generates index.html itself, so both entries were marked active. Skip the alias when a chapter already links to index.html. Fixes #2883.
2026-09-03 11:03:46 +00:00
Guillaume Gomez 88bed0792d Merge pull request #3206 from DanielEScherzer/mdbook-branch-rename
Prepare to rename primary branch to `main`
2026-09-03 12:46:19 +02:00
Guillaume Gomez 7a8d704ab8 Fix new cargo/clippy lints 2026-09-03 12:33:41 +02:00
Daniel Scherzer 65fae9c1b9 Prepare to rename primary branch to main 2026-09-03 12:33:15 +02:00
Guillaume Gomez 74b14bb0eb Merge pull request #3210 from rust-lang/renovate/crate-ci-typos-1.x
Update crate-ci/typos action to v1.50.1
2026-09-02 19:56:37 +00:00
Guillaume Gomez 77fff93dfd Merge pull request #3191 from VXNCXNX/fix/infostring-paren-comment-3188
Stop emitting infostring comments as HTML classes
2026-09-02 19:26:48 +00:00
Guillaume Gomez b89e1c848e Merge pull request #3211 from rust-lang/renovate/topological-sort-0.x
Update Rust crate topological-sort to 0.3.0
2026-09-02 19:26:07 +00:00
Guillaume Gomez ec80508cdd Merge pull request #3205 from DanielEScherzer/contributing-goml-branch
CONTRIBUTING.md: update link to goml-script.md
2026-09-02 19:25:28 +00:00
Guillaume Gomez a1d96a1a35 Use version numbers instead of commit hash 2026-09-02 21:24:14 +02:00
Guillaume Gomez c713b771b2 Merge pull request #3207 from meop/ci/linux-arm64-gnu-release-pr
ci: add native Linux ARM64 GNU releases
2026-09-02 19:22:24 +00:00
Guillaume Gomez 07faa13f8d Merge pull request #3209 from rust-lang/renovate/browser-ui-test-0.x
Update dependency browser-ui-test to v0.25.1
2026-09-02 19:16:34 +00:00
Guillaume Gomez 44066f8ecc Update code 2026-09-02 21:15:27 +02:00
renovate[bot] 84e7019b1b Update Rust crate topological-sort to 0.3.0 2026-09-02 16:22:48 +00:00
renovate[bot] 3fe86a8a75 Update dependency browser-ui-test to v0.25.1 2026-09-02 16:22:04 +00:00
Guillaume Gomez f5644a5e77 Merge pull request #3163 from alexchen-sys/fix/include-path-spaces-2812
fix(links): support spaces in #include file paths
2026-09-02 16:13:52 +00:00
Alex Chen 5f889e7672 refactor(links): strip the opening quote at the call site
parse_quoted_path now takes the input right after the opening quote,
both callers strip it with strip_prefix. Rewrite the quoted-path tests
as plain assertion tests and drop the noisy banner comments.

Signed-off-by: Alex Chen <l46983284@gmail.com>
2026-09-02 12:42:34 +00:00
Alex Chen 22977474cb test(links): pin whitespace preservation in quoted paths
A quoted path like "  spaces   " keeps its whitespace characters
verbatim; nothing is trimmed inside quotes.

Signed-off-by: Alex Chen <l46983284@gmail.com>
2026-09-02 10:12:25 +00:00
Alex Chen 022efd9583 docs(guide): document quoted include paths for names with spaces 2026-09-01 21:41:15 +00:00
Alex Chen 76a5ab1a72 refactor(links): apply review suggestion — parse range via strip_prefix directly 2026-09-01 21:12:26 +00:00
Guillaume Gomez bb6cf07330 Merge pull request #3204 from Chocorean/dev_2574
Add cargo audit to the CI
2026-09-01 19:03:25 +00:00
renovate[bot] 393f4ad5f8 Update crate-ci/typos action to v1.50.1 2026-09-01 17:46:01 +00:00
Chocorean 05ecdc0ca3 Add cargo audit to the Github CI 2026-09-01 12:51:15 -04:00
Marshall Porter 2f46d4b528 ci: add native Linux ARM64 GNU releases 2026-08-31 14:20:18 -07:00
Daniel Scherzer 425201c479 CONTRIBUTING.md: update link to goml-script.md
The GuillaumeGomez/browser-UI-test primary branch was renamed,
GuillaumeGomez/browser-UI-test#699
2026-08-31 13:24:24 -07:00
Guillaume Gomez dc21064fc2 Merge pull request #3198 from Chocorean/dev_2395
Use capital letters to indicate the default value in (y/n) prompts
2026-08-28 20:47:29 +00:00
Alex Chen 3f2c5e491e fix(links): address review feedback — DRY, escape semantics, trim removal
- Extract parse_quoted_or_plain to eliminate duplication between
  parse_include_path and parse_rustdoc_include_path
- Only \" and \\ are escapes; other \X preserves the backslash
  so Windows paths like C:\Users\file.md work correctly
- Remove trim_start inside parse_quoted_path: whitespace inside
  quotes is part of the path
- Trailing backslash (\ at end of quoted string) is now an error
- Add 44 architectural, escape-semantics, and cross-platform tests

Signed-off-by: Alex Chen <l46983284@gmail.com>
2026-08-28 11:10:37 +00:00
Alex Chen 5fe270a0dc fix(links): emit explicit error on unclosed quoted path
Signed-off-by: Alex Chen <l46983284@gmail.com>
2026-08-28 10:45:12 +00:00
Alex Chen 4f32bbb286 fix(links): support double quotes for paths with spaces
Require double quotes for file paths containing spaces across
include, rustdoc_include, and playground directives. Preserve full
backwards compatibility for unquoted paths without spaces, and
support escaped quotes inside paths.

Signed-off-by: Alex Chen <l46983284@gmail.com>
2026-08-28 10:45:12 +00:00
Alex Chen 1e2b8f9ac7 fix(links): support spaces in #include file paths
Parse the full include/rustdoc_include target instead of splitting on
whitespace, so paths like `fila a.md` work. Line ranges still work
(`fila a.md:1:2`). Playground links keep whitespace-separated properties.

Fixes #2812.

Signed-off-by: Alex Chen <l46983284@gmail.com>
2026-08-28 10:45:12 +00:00
Noah Lev 54e4f3bf6d Merge pull request #3194 from GuillaumeGomez/zoomable-images-support
Add new `zoomable-images` config
2026-08-26 18:30:28 +00:00
Guillaume Gomez 9458fe14f1 Add new zoomable-images config 2026-08-26 20:13:44 +02:00
Chocorean b8686a21d1 Fix #2395
Improve the two yes/no prompts by capitalizing the default choice, No
2026-08-26 14:01:48 -04:00
Guillaume Gomez 78cd8333bf Merge pull request #2664 from miguelraz/typos-ci
Add typos for CI, include typos.toml
2026-08-22 22:33:12 +00:00