Skip to content

Invalid default-theme and preferred-dark-theme now cause an error#3141

Open
hollow-owl wants to merge 1 commit into
rust-lang:masterfrom
hollow-owl:invalid-default-theme
Open

Invalid default-theme and preferred-dark-theme now cause an error#3141
hollow-owl wants to merge 1 commit into
rust-lang:masterfrom
hollow-owl:invalid-default-theme

Conversation

@hollow-owl

Copy link
Copy Markdown

This causes building to fail if default-theme or preferred-dark-theme is not one of the built-in themes.

If book.toml has an invalid default-theme:

mdbook build outputs an error saying why:

 INFO Book building has started
 INFO Running the html backend
ERROR Failed to deserialize `output.html`
        Caused by: unknown variant `does-not-exist`, expected one of `ayu`, `coal`, `light`, `navy`, `rust`
in `default-theme`

 INFO HTML book written to `/scratch/book`

Fixes #3140

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: waiting on a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid theme causes Rendering failed, but an invalid default-theme does not

2 participants