Diagrammo in Astro

Add the plugin, then write a diagram in any Markdown page.

See it live — every chart type rendered through Astro, refreshed on each release.

1.Install

bash
pnpm add astro-dgmo @diagrammo/dgmo

Then register the integration in astro.config.mjs:

js
import { defineConfig } from 'astro/config';
import dgmo from 'astro-dgmo';

export default defineConfig({
  integrations: [dgmo()],
});

2.Use

In any .md or .mdx file

markdown
```dgmo
pie Browser Market Share (2025)
Chrome 63.5
Safari 19.8
Firefox  6.2
Edge     5.1
Other    5.4
```

Produces

Pie chart with 5 slices totalling 100; the largest is Chrome at 64%.Browser Market Share (2025)Chrome — 63.5 (64%)Safari — 19.8 (20%)Firefox — 6.2 (6%)Edge — 5.1 (5%)Other — 5.4 (5%)
pie Browser Market Share (2025)

Chrome           63.5
Safari           19.8
Firefox           6.2
Edge              5.1
Other             5.4

Everywhere else it goes

Keep the embedded diagram current

A live link shows the latest version wherever it is embedded, so editing the diagram once updates every place that holds it.