Mermaid: Diagramming and charting tool
- Class Diagrams
- Entity Relationship Diagrams
- Flowcharts
- Gantt Diagrams
- Git Graphs
- Mindmaps
- Pie Charts
- Quadrant Chart
- Sequence Diagrams
- Timeline Diagrams
Example
Section titled โExampleโThe following mermaid
markdown code block:
flowchart LR Start --> Stop
will produce the diagram:
Enabling Mermaid
Section titled โEnabling MermaidโWhen you choose Mermaid as an option, the following are added to the Starlight project:
- Two dependencies are added:
- rehype-mermaid โ used to support the Mermaid dialect in Markdown code blocks
- playwright โ used to render the Mermaid diagrams into images
- A
postinstall
script inpackage.json
to installchromium
browser support forplaywright
. - The
rehypeMermaid
plugin is added to themarkdown.rehypePlugins
Astro configuration.