Antora

Setup

My current Antora setup runs these services:

kroki

A Kroki main server to generate images from PlantUML sources.

mermaid

A Mermaid server in support of Kroki.

Diagram

Configuration remarks:

  • The Kroki servers also run in a GitHub action. There, they can be reached using the domain name kroki. To make the same playbook work locally, I added this name to my /etc/hosts file too:

    127.0.0.1	kroki
  • In an Antora playbook, I add the following lines to use Kroki:

    asciidoc:
      extensions:
      - asciidoctor-kroki (1)
      attributes:
        kroki-fetch-diagram: true (2)
        allow-uri-read: true
        experimental: true
        kroki-default-format@: svg
        kroki-server-url: http://kroki:8000 (3)
    1 Use kroki to generate diagram images
    2 For kroki: store the image. This requires allow-uri-read, as well as experimental (to override kroki security)
    3 Uses a local kroki server via docker compose

Example files

docker-compose.yml
version: "3"
services:
  kroki:
    image: yuzutech/kroki
    depends_on:
      - mermaid
    environment:
      - KROKI_MERMAID_HOST=mermaid
    ports:
      - "8000:8000"
  mermaid:
    image: yuzutech/kroki-mermaid
    expose:
      - "8002"
chevron_left
chevron_right
Twitter LinkedIn Github Gitlab Meetup RSS Miro Trello Zotero Hypothesis