cargo install mdbook-graphviz
Install Graphviz
brew install graphviz
book.toml
toml
[preprocessor.graphviz]
command = "mdbook-graphviz"
Just dot
is supported, but any of the other graphviz tools would be easy to add.
dot
Code Block For Processing~~~markdown
dot process
digraph {
processed -> graph
}
~~~
~~~markdown
~~~
~~~markdown
dot process Named Graph
digraph {
processed -> graph
}
~~~
~~~markdown
~~~
dot
Code Blocks Without The process
Flag Are Ignored~~~markdown
dot
digraph {
processed -> graph
}
~~~
~~~markdown
dot
digraph {
processed -> graph
}
~~~
The generated svg files are output into the book src folder for now, this .gitignore
should cover them
*.generated.svg