This post demonstrates the difference between rendering Mermaid diagrams and showing the raw code.
Raw Code (will NOT render)
Use text as the language identifier to show the code:
graph TD
A[Start] --> B[Process]
B --> C{Decision}
C -->|Yes| D[Action]
C -->|No| E[End]
Rendered Diagram
Set mermaid: true in the post frontmatter, then use mermaid as the code block language. The browser loads Mermaid from cdn.jsdelivr.net. If the CDN is unavailable, the reader sees the original diagram source. Without the flag, the block stays as code:
graph TD
A[Start] --> B[Process]
B --> C{Decision}
C -->|Yes| D[Action]
C -->|No| E[End]

Another Example: Sequence Diagram
Raw code:
sequenceDiagram
Alice->>Bob: Hello Bob!
Bob-->>Alice: Hi Alice!
Rendered:
sequenceDiagram
Alice->>Bob: Hello Bob!
Bob-->>Alice: Hi Alice!
Summary
| Language Identifier | Result |
|---|---|
mermaid | Diagram, or source while offline |
text | Shows raw code |
plaintext | Shows raw code |
| (none) | Shows raw code |