From ddf73e147fd06d09aba275df2e97d27da5f44880 Mon Sep 17 00:00:00 2001 From: Dunya Kirkali Date: Fri, 6 Sep 2024 18:27:54 +0000 Subject: [PATCH] Enable kroki --- Makefile | 14 ++++++++++---- book.adoc | 3 +++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 729acd4..bb318f5 100644 --- a/Makefile +++ b/Makefile @@ -15,17 +15,23 @@ ASCIIDOC_FLAGS = \ all: $(PDF_PATH) $(EPUB_PATH) -$(PDF_PATH): $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml | output +$(PDF_PATH): book.adoc $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml | output asciidoctor-pdf book.adoc $(ASCIIDOC_FLAGS) \ -o $@ \ -r asciidoctor-diagram \ - -r asciidoctor-mathematical + -r asciidoctor-mathematical \ + -r asciidoctor-kroki \ + -a allow-uri-read \ + --safe-mode server -$(EPUB_PATH): $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml | output +$(EPUB_PATH): book.adoc $(ASCIIDOC_FILES) $(FIGURES) Makefile metadata.yaml | output asciidoctor-epub3 book.adoc $(ASCIIDOC_FLAGS) \ -o $@ \ -r asciidoctor-diagram \ - -r asciidoctor-mathematical + -r asciidoctor-mathematical \ + -r asciidoctor-kroki \ + -a allow-uri-read \ + --safe-mode server count: wc -w source/* diff --git a/book.adoc b/book.adoc index 8f0fd91..9c23bd4 100644 --- a/book.adoc +++ b/book.adoc @@ -11,6 +11,9 @@ Alexandra Thompson :front-image: backgrounds/cover.png :back-image: backgrounds/back-cover.png :imagesdir: figures +:kroki-server-url: https://kroki.io +:kroki-fetch-diagram: +:kroki-data-uri: include::source/front_matter.adoc[]