Diagrammo in Docusaurus

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

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

1.Install

bash
pnpm add docusaurus-plugin-dgmo @diagrammo/dgmo

Then wrap your docusaurus.config.ts with defineConfig — it injects the remark plugin into every preset slot and registers the plugin for you:

ts
import { defineConfig } from 'docusaurus-plugin-dgmo/config';

export default defineConfig({
  title: 'My Docs',
  url: 'https://example.com',
  baseUrl: '/',
  presets: [
    ['classic', {
      docs: { sidebarPath: './sidebars.ts' },
      blog: { showReadingTime: true },
    }],
  ],
});

2.Use

In any .md file under docs/, blog/, or pages/

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

Color-mode toggle in the Docusaurus navbar swaps each diagram between its palette light and dark variants — no extra config. Under the default colorMode: 'auto', every block is rendered twice (light + dark SVG) and CSS hides the wrong one.

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.