Dot_extensionSourceGraphviz/DOT diagram extension for odoc.
Renders {@dot[...]} code blocks as diagrams. By default uses client-side JavaScript (Viz.js), but can render server-side to PNG/SVG with format option.
Example:
{@dot layout=neato[
digraph G {
a -> b -> c;
b -> d;
}The Viz.js library URL for client-side rendering
val get_layout :
[< `Binding of
string Odoc_parser.Loc.with_location
* string Odoc_parser.Loc.with_location
| `Tag of 'a ]
list ->
stringExtract option values
val get_format :
[< `Binding of
string Odoc_parser.Loc.with_location * 'a Odoc_parser.Loc.with_location
| `Tag of 'b ]
list ->
'a optionval get_filename :
[< `Binding of
string Odoc_parser.Loc.with_location * 'a Odoc_parser.Loc.with_location
| `Tag of 'b ]
list ->
'a optionval get_dimensions :
[< `Binding of
string Odoc_parser.Loc.with_location * 'a Odoc_parser.Loc.with_location &
string Odoc_parser.Loc.with_location
* 'b Odoc_parser.Loc.with_location
| `Tag of 'c & 'd ]
list ->
'b option * 'a optionCheck if content looks like a complete DOT graph
Wrap content in a digraph if needed
Build inline style string from dimensions
Run the dot command to render to a specific format
JavaScript code to render a single diagram (for client-side rendering)
CSS for dot diagrams
Extension documentation