Mermaid Diagrams
Mermaid is not enabled by default. This sample adds the mermaid package and
a small Astro component that turns diagram source into SVG in the browser.
Flowchart
Section titled “Flowchart”flowchart TD A[Write MDX] --> B[Astro build] B --> C[Static HTML] C --> D[Pagefind index]
Sequence diagram
Section titled “Sequence diagram”sequenceDiagram participant Reader participant Browser participant StaticHost Reader->>Browser: Open documentation Browser->>StaticHost: Request HTML StaticHost-->>Browser: Prebuilt page
The page content is still prerendered, but the diagrams require JavaScript to become SVG. A build-time Mermaid plugin would be preferable when diagrams must work with JavaScript disabled.