Skip to content

docs(antora): switch Mermaid to offline rendering via "markup-antora"…#206

Merged
michalharakal merged 1 commit into
developfrom
chore/docs-markup-antora
Jun 29, 2026
Merged

docs(antora): switch Mermaid to offline rendering via "markup-antora"…#206
michalharakal merged 1 commit into
developfrom
chore/docs-markup-antora

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

… image

Migrate the docs image to the consolidated "markup-antora" definition (one image shared across the SKaiNET docs projects, vendored here until the public registry image is published) and switch Mermaid rendering from the external Kroki round-trip to fully offline.

Playbook: drop asciidoctor-kroki + kroki-fetch-diagram in favour of /opt/antora/local-mermaid-extension.js; add runtime.cache_dir so the container runs rootless. Matches mainline SKaiNET.

Features of the merged image:

  • Offline Mermaid: every [mermaid] block is rendered to inline SVG at build time by mermaid-cli (Alpine Chromium + Puppeteer). No Kroki, no kroki.io, no network at build or view time. Removes the asciidoctor- kroki 4 KB GET-URL limit that rejected large diagrams.
  • Diagram caching: content-hash, in-memory + optional on-disk (MERMAID_CACHE_DIR); identical diagrams render once.
  • Rootless-safe under --user $(id -u):$(id -g) (HOME=/tmp + cleanup of root-owned /tmp dirs; fixes Chromium crashpad / cosmiconfig EACCES).
  • Build-time mermaid smoke test (a broken image fails docker build).
  • Offline extras available: @antora/lunr-extension, pre-baked Antora UI bundle, MathJax es5; asciidoctor-kroki kept as an escape hatch.
  • Full Alpine font set for diagram labels, emoji and CJK.

CI is unchanged: docs.yml already builds from docs/.docker.

Usage and details: see docs/.docker/README.md.

… image

Migrate the docs image to the consolidated "markup-antora" definition
(one image shared across the SKaiNET docs projects, vendored here until
the public registry image is published) and switch Mermaid rendering
from the external Kroki round-trip to fully offline.

Playbook: drop asciidoctor-kroki + kroki-fetch-diagram in favour of
/opt/antora/local-mermaid-extension.js; add runtime.cache_dir so the
container runs rootless. Matches mainline SKaiNET.

Features of the merged image:
- Offline Mermaid: every [mermaid] block is rendered to inline SVG at
  build time by mermaid-cli (Alpine Chromium + Puppeteer). No Kroki, no
  kroki.io, no network at build or view time. Removes the asciidoctor-
  kroki 4 KB GET-URL limit that rejected large diagrams.
- Diagram caching: content-hash, in-memory + optional on-disk
  (MERMAID_CACHE_DIR); identical diagrams render once.
- Rootless-safe under --user $(id -u):$(id -g) (HOME=/tmp + cleanup of
  root-owned /tmp dirs; fixes Chromium crashpad / cosmiconfig EACCES).
- Build-time mermaid smoke test (a broken image fails docker build).
- Offline extras available: @antora/lunr-extension, pre-baked Antora UI
  bundle, MathJax es5; asciidoctor-kroki kept as an escape hatch.
- Full Alpine font set for diagram labels, emoji and CJK.

CI is unchanged: docs.yml already builds from docs/.docker.

Usage and details: see docs/.docker/README.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@michalharakal michalharakal merged commit 8d0f673 into develop Jun 29, 2026
1 check passed
@michalharakal michalharakal deleted the chore/docs-markup-antora branch June 29, 2026 12:11
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