Mermaid Diagrams in Astro
This post demonstrates that mermaid diagrams are now working correctly in this Astro site.
Flowchart Example
graph TD
A[Start] --> B{Is it working?}
B -->|Yes| C[Great!]
B -->|No| D[Debug]
D --> B
C --> E[End]
Sequence Diagram
sequenceDiagram
participant U as User
participant B as Browser
participant S as Server
participant M as Mermaid
U->>B: Visit page
B->>S: Request content
S->>B: Return HTML with mermaid code
B->>M: Initialize diagrams
M->>B: Render SVG
B->>U: Display page with diagrams
Git Flow
graph LR
A[main] --> B[commit 1]
B --> C[commit 2]
C --> D[feature branch]
D --> E[feature commit 1]
D --> F[feature commit 2]
F --> G[merge to main]
C --> G
G --> H[final commit]
All diagrams above should render correctly as interactive SVG graphics instead of code blocks.