The plain-text diagrams Markdown finally supports
Math (LaTeX-style)
GitHub renders LaTeX math natively (since 2022) using KaTeX. Inline math: $ ... $. Display math: $$ ... $$ on its own paragraph. The same syntax works on most modern docs platforms (GitLab, Obsidian, Notion, MkDocs Material with the right plugin).
Mermaid diagrams
```mermaid fenced blocks render as flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, state machines, and more. GitHub renders Mermaid natively. Diagram source lives in the file — diff-friendly, version-controlled, no binary export pipeline.
Other diagram dialects
- GeoJSON —
```geojsonrenders a map on GitHub. - STL —
```stlrenders 3D models on GitHub. - PlantUML, GraphViz — supported on some platforms (MkDocs with plugin), not GitHub.
Portability tactic: if you ship to a non-GitHub target that doesn't render Mermaid, render the diagram once with
mmdc (mermaid-cli) and commit the SVG next to the source. Reference the SVG; keep the source as a fallback. Editable + portable.