For simple graph diagrams it's easy enough to open up a separate graphviz .dot file, write up a graph specification, run it through dot or neato, and include the .png in your markdown file. And then automate this with a Makefile.
Makefile
all: example.html
example.html: example.md example.png
pandoc $< -o $@
example.png: example.dot
dot -Tpng $< -o $@
example.dot digraph G {
foo -> bar;
}
example.md # Example
Or just use zim ( https://zim-wiki.org/ ) which allows you to embed graphviz diagrams in any 'page', and many other features.