Diagrammo in Astro
Add the plugin, then write a diagram in any Markdown page.
1.Install
pnpm add astro-dgmo @diagrammo/dgmo Then register the integration in astro.config.mjs:
import { defineConfig } from 'astro/config';
import dgmo from 'astro-dgmo';
export default defineConfig({
integrations: [dgmo()],
}); Live links
A live link is the address of a diagram you show on the web. The app marks that diagram with an amber globe, . Edit the diagram in Diagrammo and every place that holds the link catches up — no export, no copy to replace. In Astro it goes in a fence, so a diagram that lives somewhere else never goes quietly out of date here.
- 1
Get the link
In Diagrammo, open the diagram and press Share on the left rail (or ⌘E), then Show on the web → Show. Or right-click it in the file list and choose Show and copy link. Either way the link is copied. To copy it again, press the lit amber globe on the rail. See where these are in the app.
- 2
Paste it into a fence
A
dgmofence, the link on a line of its own — shown below. - 3
Keep editing
Each time your site builds, the plugin fetches the diagram as its author last saved it.
A live link in a fence
```dgmo
https://online.diagrammo.app/d/dgm_01M3PG3DQ6S89W7ZFM5Z06J1CD
```
Once you know its id, live-link dgm_01M3PG3DQ6S89W7ZFM5Z06J1CD
inside the fence does the same job.
- When your page changes
-
On the next build. The plugin keeps what it fetched in
.dgmo/references/— commit that folder, so a build without network still draws the last version it saw. What happens when a fetch fails, and how to build offline, is in Live links. - Stopping
- Press Stop showing in the same Share dialog. The link stops drawing the diagram within five minutes, and your next build shows a short placeholder in its place.