Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 640 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 640 Bytes

@beoe/rehype-vizdom

Rehype plugin to generate Vizdom diagrams in place of code fences. This

```vizdom
digraph G { Hello -> World }
```

will be converted to

<figure class="beoe vizdom">
  <svg>...</svg>
</figure>

which can look like this:

TODO: add screenshot

Usage

import rehypeVizdom from "@beoe/rehype-vizdom";

const html = await unified()
  .use(remarkParse)
  .use(remarkRehype)
  .use(rehypeVizdom)
  .use(rehypeStringify)
  .process(`markdown`);

Online documentation provides more details.