Skip to content

Commit 11974d8

Browse files
authored
Merge pull request #95 from livesession/feat/graphviz
feat(graphviz): impl for graphviz + fix search
2 parents 1760f84 + d922cd4 commit 11974d8

17 files changed

Lines changed: 5262 additions & 3846 deletions

File tree

apps/docs/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"title": "Edit page",
3838
"icon": "docs:github"
3939
},
40-
"diagrams": true,
40+
"diagrams": ["mermaid", "graphviz"],
4141
"search": {
4242
"orama": true
4343
},

apps/docs/guides/developer-content.md

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,95 @@ graph TD;
298298
D --> E;
299299
```
300300

301-
### Latex
301+
### Graphviz {label="Beta"}
302+
Visualize complex concepts and workflows using [Graphviz](https://graphviz.org) diagrams directly in your Markdown. Graphviz is a powerful graph visualization software that supports various layout engines (dot, neato, fdp, sfdp, circo, twopi) for creating directed graphs, undirected graphs, hierarchies, and more.
303+
304+
**Note:** Currently, only `dot` [engine](https://graphviz.org/docs/layouts) is supported.
305+
306+
:::callout{kind="warning"}
307+
Before you start writing a Graphviz diagrams make sure you enabled `diagrams` integration:
308+
309+
```json docs.json
310+
{
311+
...
312+
"integrations": {
313+
"diagrams": ["graphviz"]
314+
}
315+
}
316+
```
317+
318+
:::
319+
320+
Simply wrap your diagram syntax in a `dot` code block:
321+
~~~
322+
```dot
323+
digraph G {
324+
fontname="Helvetica,Arial,sans-serif"
325+
node [fontname="Helvetica,Arial,sans-serif"]
326+
edge [fontname="Helvetica,Arial,sans-serif"]
327+
328+
subgraph cluster_0 {
329+
style=filled;
330+
color=lightgrey;
331+
node [style=filled,color=white];
332+
a0 -> a1 -> a2 -> a3;
333+
label = "process #1";
334+
}
335+
336+
subgraph cluster_1 {
337+
node [style=filled];
338+
b0 -> b1 -> b2 -> b3;
339+
label = "process #2";
340+
color=blue
341+
}
342+
start -> a0;
343+
start -> b0;
344+
a1 -> b3;
345+
b2 -> a3;
346+
a3 -> a0;
347+
a3 -> end;
348+
b3 -> end;
349+
350+
start [shape=Mdiamond];
351+
end [shape=Msquare];
352+
}
353+
```
354+
~~~
355+
356+
```dot
357+
digraph G {
358+
fontname="Helvetica,Arial,sans-serif"
359+
node [fontname="Helvetica,Arial,sans-serif"]
360+
edge [fontname="Helvetica,Arial,sans-serif"]
361+
362+
subgraph cluster_0 {
363+
style=filled;
364+
color=lightgrey;
365+
node [style=filled,color=white];
366+
a0 -> a1 -> a2 -> a3;
367+
label = "process #1";
368+
}
369+
370+
subgraph cluster_1 {
371+
node [style=filled];
372+
b0 -> b1 -> b2 -> b3;
373+
label = "process #2";
374+
color=blue
375+
}
376+
start -> a0;
377+
start -> b0;
378+
a1 -> b3;
379+
b2 -> a3;
380+
a3 -> a0;
381+
a3 -> end;
382+
b3 -> end;
383+
384+
start [shape=Mdiamond];
385+
end [shape=Msquare];
386+
}
387+
```
388+
389+
## Latex
302390
Supports [LaTeX](https://www.latex-project.org/) for math equations. To use LaTeX, wrap your inline math equations in `$`. For example, `$(a^2 + b^2 = c^2)$` will render $a^2 + b^2 = c^2$.
303391

304392
For display math equations, wrap the equation in `$$`:

0 commit comments

Comments
 (0)