ITADN

Add Mermaid diagram rendering to Antora docs

#592Closedjulioest 创建于 2026-02-08
J
julioestcommented
### Summary Allow doc authors to embed [Mermaid](https://mermaid.js.org/) diagrams (flowcharts, sequence diagrams, etc.) as plain text in AsciiDoc files, rendered as SVGs in the browser. ### Motivation Diagrams are currently external PNGs -- hard to diff, update, and keep consistent. Mermaid lets contributors define diagrams as text that renders client-side as crisp, scalable SVGs. ### Proposed Solution Use [@sntke/antora-mermaid-extension](https://github.com/snt/antora-mermaid-extension). At build time it registers a `[mermaid]` AsciiDoc block processor and injects a Mermaid.js `<script>` tag via our existing empty `header-scripts.hbs` partial. No UI bundle rebuild needed. ### Changes required - `package.json` -- add @sntke/antora-mermaid-extension dependency - `site.playbook.yml `-- register extension under antora.extensions - `libs.playbook.yml `-- register extension under antora.extensions
关闭于 2026-02-09 3 条评论