0.5.4 • Published 7 months ago

@beoe/rehype-d2 v0.5.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@beoe/rehype-d2

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

```d2
x -> y: hello world
```

will be converted to

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

which can look like this:

Usage

import rehypeD2 from "@beoe/rehype-d2";

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

Online documentation provides more details.

0.5.4

7 months ago

0.5.3

8 months ago

0.5.2

9 months ago

0.5.1

9 months ago

0.5.0

9 months ago

0.4.1

10 months ago

0.4.0

10 months ago

0.3.0

12 months ago

0.2.0

12 months ago

0.1.0

12 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago