Skip to content

Latest commit

 

History

History

rehype-vizdom

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@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.