mermaid and SVG¶
🌐 AI ReaderRead this document in English or ask questions: Open in Claude, ChatGPT, or Gemini ↗
mermaid¶
Write a plain ```mermaid fence (not ```{mermaid}). myst_fence_as_directive = ["mermaid"] makes the same block preview in PyCharm / GitHub and render through sphinxcontrib-mermaid in the Sphinx build.
flowchart LR
A[Write README.md] --> B[git push]
B --> C[GitHub Actions]
C --> D[sphinx-build]
D --> E[Cloudflare Pages]
E --> F[Browser]
E --> G[AI agent]
Sequence diagram¶
sequenceDiagram
participant Agent
participant KB as kb.example.com
Agent->>KB: GET /llms.txt
KB-->>Agent: document list (raw source links)
Agent->>KB: GET /p/<doc_id>.md
KB-->>Agent: 302 to /_sources/.../README.md
SVG file¶
Keep the SVG file in the document’s folder and use the plain Markdown image syntax; GitHub shows it too:
Inline SVG¶
SVG markup written straight into the Markdown is passed through as raw HTML: