Diagrams
Fenced code blocks in three diagram languages render as diagrams. They work in Live and Read mode, in Sunstone Web and in PDF export.
| Language | Fence | Notes |
|---|---|---|
| Mermaid | ```mermaid |
Flowcharts, sequence diagrams, state diagrams and more. |
| D2 | ```d2 |
External icons are never fetched. |
| PlantUML | ```plantuml |
@startuml is optional. Including from the standard library (!include <C4/…>) isn't supported yet. |
Diagrams are drawn in the app's colours and follow a switch between light and dark. Colours you set in the diagram yourself are kept. Each renderer loads only when a Concept actually contains such a block, and everything renders on your machine: nothing is sent to a server.
Double-click a diagram (or switch to Source) to edit it. An invalid diagram shows the error inline, next to its source.
direction: right
write: Write a d2 block
render: Sunstone renders it
write -> render
Sources
- Sunstone CHANGELOGhttps://github.com/pothos-dev/sunstone/blob/main/CHANGELOG.md