mdbook v0.5 support #60

Closed
opened 2025-10-24 05:05:01 +00:00 by fence-sitter · 3 comments
fence-sitter commented 2025-10-24 05:05:01 +00:00 (Migrated from github.com)

mdbook v0.5.0 is in the works!

This issue is just to let you know that mdbook-mermaid v0.16.2 does not seem to be compatible with mdbook v0.5.0-alpha.1, which likely means that it will not be compatible with mdbook v0.5.0 (whenever that is released).

$ # Print versions.
$ mdbook --version
mdbook v0.5.0-alpha.1
$ mdbook-mermaid --version
mdbook-mermaid 0.16.2

$ # Create test book.
$ mkdir test
$ cd test
$ mdbook init --force
 INFO Creating a new book with stub content

All done, no errors...

$ # Configure mdbook-mermaid.
$ echo >> book.toml '
[preprocessor.mermaid]
command = "mdbook-mermaid"

[output.html]
additional-js = ["mermaid.min.js", "mermaid-init.js"]'
$ mdbook-mermaid install .
[2025-10-24T04:56:18Z INFO  mdbook_mermaid] Reading configuration file ./book.toml
[2025-10-24T04:56:18Z INFO  mdbook_mermaid] Writing additional files to project directory at .
[2025-10-24T04:56:18Z INFO  mdbook_mermaid] Files & configuration for mdbook-mermaid are installed. You can start using it in your book.
[2025-10-24T04:56:18Z INFO  mdbook_mermaid] Add a code block like:
    ```mermaid
    graph TD;
        A-->B;
        A-->C;
        B-->D;
        C-->D;
    ```

$ # Build the book.
$ mdbook build
 INFO Book building has started
Unable to parse the input
ERROR The "mermaid" preprocessor exited unsuccessfully with exit status: 1 status
`mdbook v0.5.0` is [in the works](https://github.com/rust-lang/mdBook/blob/118c1096eaf231e2d87fa7bb18980c0d3599f8f8/CHANGELOG.md#05-migration-guide)! This issue is just to let you know that `mdbook-mermaid v0.16.2` does not seem to be compatible with `mdbook v0.5.0-alpha.1`, which likely means that it will not be compatible with `mdbook v0.5.0` (whenever that is released). ```console $ # Print versions. $ mdbook --version mdbook v0.5.0-alpha.1 $ mdbook-mermaid --version mdbook-mermaid 0.16.2 $ # Create test book. $ mkdir test $ cd test $ mdbook init --force INFO Creating a new book with stub content All done, no errors... $ # Configure mdbook-mermaid. $ echo >> book.toml ' [preprocessor.mermaid] command = "mdbook-mermaid" [output.html] additional-js = ["mermaid.min.js", "mermaid-init.js"]' $ mdbook-mermaid install . [2025-10-24T04:56:18Z INFO mdbook_mermaid] Reading configuration file ./book.toml [2025-10-24T04:56:18Z INFO mdbook_mermaid] Writing additional files to project directory at . [2025-10-24T04:56:18Z INFO mdbook_mermaid] Files & configuration for mdbook-mermaid are installed. You can start using it in your book. [2025-10-24T04:56:18Z INFO mdbook_mermaid] Add a code block like: ```mermaid graph TD; A-->B; A-->C; B-->D; C-->D; ``` $ # Build the book. $ mdbook build INFO Book building has started Unable to parse the input ERROR The "mermaid" preprocessor exited unsuccessfully with exit status: 1 status ```
badboy commented 2025-10-24 12:11:33 +00:00 (Migrated from github.com)

The split into multiple crates needs some updates here.
Did that in a branch: https://github.com/badboy/mdbook-mermaid/compare/mdbook-0.5

Doesn't look too bad.

The split into multiple crates needs some updates here. Did that in a branch: https://github.com/badboy/mdbook-mermaid/compare/mdbook-0.5 Doesn't look too bad.
fence-sitter commented 2025-10-25 02:05:26 +00:00 (Migrated from github.com)

Nice, thank you! I've tested your branch and it works on my end.

Nice, thank you! I've tested your branch and it works on my end.
fence-sitter commented 2025-11-19 02:17:36 +00:00 (Migrated from github.com)

Thanks for this!

Thanks for this!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jer/mdbook-mermaid#60
No description provided.