#svg #mdbook #diagram #svgdx

bin+lib mdbook-svgdx

mdbook preprocessor to convert svgdx fenced code blocks into inline SVG images

4 releases (breaking)

0.4.0 Dec 31, 2024
0.3.0 Nov 18, 2024
0.2.0 Oct 3, 2024
0.1.0 Sep 25, 2024

#1301 in Text processing

Download history 162/week @ 2024-09-24 160/week @ 2024-10-01 17/week @ 2024-10-08 2/week @ 2024-10-15 63/week @ 2024-11-12 111/week @ 2024-11-19 3/week @ 2024-11-26 23/week @ 2024-12-10 3/week @ 2024-12-17 140/week @ 2024-12-31

166 downloads per month

MIT license

23KB
197 lines

mdbook-svgdx

A preprocessor for mdBook to convert svgdx fenced code blocks into inline SVG images.

Installation

For now installation requires a working Rust toolchain, e.g. installed from rustup.rs.

Install mdbook-svgdx as follows:

cargo install mdbook-svgdx

Usage

Your mdbook source must be configured to use the mdbook-svgdx preprocessor. To do this, simply add the following line to your book.toml file.

[preprocessor.svgdx]

Developing

To test changes to mdbook-svgdx, update your book.toml with the following 'command' line under the preprocessor.svgdx block:

[preprocessor.svgdx]
command = "cargo run --manifest-path /path/to/mdbook-svgdx/Cargo.toml --quiet"

In order to test changes to the svgdx library itself, update the appropriate dependencies entry of Cargo.toml of this (mdbook-svgdx) repo to point to a local clone of svgdx, rather than providing a version specifier:

svgdx = { path = "/path/to/svgdx", default-features = false }

License

This repository is released under the MIT license; for more information see the LICENSE file.

Dependencies

~16–28MB
~420K SLoC