mdbook-svgbob-0.2.0 is not a library.
Svgbob plugin for mdbook
Svgbob-based preprocessor for mdbook transform your ascii diagrams into a svg.
This renders a code-block marked bob
into neat svg diagrams and inline it into the output.
Usage
Firstly add the following to your book's manifest file
(usually book.toml
)
[] # all fields by default
See config for more information.
Add some ascii graphics:
chapter_1.md
```bob
Build your book and open:
mdbook build
open book/index.html
Config
Default preprocessor config:
[]
# svgbob configuration:
# doc: https://docs.rs/svgbob/latest/svgbob/struct.Settings.html
# default values: https://github.com/ivanceras/svgbob/blob/master/packages/svgbob/src/settings.rs#L29-L38
= 14
= "Iosevka Fixed, monospace"
= "black"
= "transparent" # default overridden, differs from svgbob's default
= "var(--fg)" # default overridden, differs from svgbob's default
= 2.0
= 8.0
= true
= true
= true
= true
= false
# preprocessor configuration:
= "bob" # render only code-blocks marked as "bob", e.g.: ```bob
All properties are optional.
See svgbob's settings doc and default values.
For more information about mdbook see mdbook manual, svgbob spec and editor.
Contribution
Contributions are appreciated. Don't hesitate to participate to discussions in the issues, propose new features and ask for help.
Useful hint for one-command builds crate + book:
- add
command
to the manifest:
# book.toml
[]
= "cargo run --manifest-path /path/to/mdbook-svgbob/Cargo.toml --quiet"
- So then you only need to rebuild the book. Run something like this:
RUST_LOG=mdbook_svgbob=trace