| Crates.io | badascii-mdbook |
| lib.rs | badascii-mdbook |
| version | 0.3.1 |
| created_at | 2025-04-22 04:29:04.137572+00 |
| updated_at | 2025-04-23 04:23:25.074559+00 |
| description | Embed badascii diagrams in your mdbook. See badascii.me for the editor. |
| homepage | https://badascii.me |
| repository | https://github.com/samitbasu/badascii |
| max_upload_size | |
| id | 1643616 |
| size | 91,596 |
A preprocessor for mdbook to add badascii support.
It turns a badascii diagram like this:
+-------------+ +-------------+ | Thing 1 | | Thing 2 | | | | | +--->|ins outs+------->|ins outs+----+ | | | | | | | | | | | | | +-------------+ +-------------+ | | | +----------------------------------------------+
into an embedded SVG like this:
in your book.
To install from source
cargo install --locked badascii-mdbook
This will install the mdbook-badascii binary from source.
You need to configure your mdbook to use the preprocessor. This
requires adding the following to your book.toml
[preprocessor.badascii]
If you also want the formal mode for diagrams, you can include a config
flag in the book.toml.
[preprocessor.badascii]
formal = true
This will convert all of the diagrams using formal mode.
Then you can build your book
mdbook build path/to/book