When playing with asciidoctor-kroki and various combinations of kroki-http-method and kroki-fetch-diagram, I had the idea to use Data URLs for storing the returned image data instead of files or just directly GETable URLs.
It has the advantage of exporting self-contained HTML versions of the documents. However, it does no longer allow caching already rendered diagrams well. (This is not so important for me as I'm using a local kroki server, anyway.)
The following patch contains a very quick'n'dirty proof-of-concept:
When playing with asciidoctor-kroki and various combinations of
kroki-http-method
andkroki-fetch-diagram
, I had the idea to use Data URLs for storing the returned image data instead of files or just directly GETable URLs.It has the advantage of exporting self-contained HTML versions of the documents. However, it does no longer allow caching already rendered diagrams well. (This is not so important for me as I'm using a local kroki server, anyway.)
The following patch contains a very quick'n'dirty proof-of-concept: