Skip to content

Site A: render PlantUML diagrams on the spec page - #46

Merged
OliEder merged 7 commits into
mainfrom
feat/site-a-diagrams
Aug 28, 2026
Merged

OliEder merged 7 commits into
mainfrom
feat/site-a-diagrams

Conversation

@OliEder

@OliEder OliEder commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Plan A of the site redesign. Renders the spec page's PlantUML blocks as inline, responsive SVG at build time — they currently show as raw @startuml text.

Also lands the site-redesign design doc and Plan A (first of four sequential plans).

What

  • site/src/lib/diagram.mjs — a small façade renderDiagram(type, source); Plan A implements the plantuml branch (POST to Kroki, returns SVG, throws on non-OK = build-fails-loud). Mermaid/arc42 come in Plan D.
  • build-adoc.mjs post-processes the asciidoctor HTML: literalblocks holding @startuml are replaced with the rendered SVG.
  • Large, responsive diagrams on /docs/spec (.diagram-svg styling via :global).
  • CI: the a11y workflow (already builds the site on PRs, exercising the live Kroki call) now also runs the diagram unit tests.

Verified

  • Unit tests (injected fetch/renderer, no network): diagram 3/3, replace-plantuml 2/2.
  • Real npm run build:adoc embeds 2 <svg> diagrams, 0 leftover @startuml.
  • Full npm run build + built /docs/spec page contain the SVGs.

Note

Verified fact: public kroki.io renders PlantUML but 500s on Mermaid; the spec uses only PlantUML (arc42 uses only Mermaid → local mmdc in Plan D). Design doc updated accordingly.

Leaving the merge to you (as agreed). The next plans (B nav/homepage, C Try-it + sport pages, D arc42) build on this.

🤖 Generated with Claude Code

@OliEder
OliEder merged commit 8ab95b5 into main Aug 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant