Closed nfrankel closed 1 year ago
Kind of, sort of. The diagram processor has a mechanism to avoid rerendering images if nothing changed in the inputs. It does this by computing a hash over the diagram source code and saving that in a metadata file along with some other attributes. If the metadata file exists when rendering and the hash has not changed the rendered image will be used as is.
These metadata files get written to a .asciidoctor/diagram
directory relative to the asciidoc file. You can override that per diagram block using the cachedir
attribute or globally using the diagram-cachedir
document attribute.
I think you should be able to use this to achieve what you're trying to do, but I haven't tried this out myself.
Thanks @pepijnve, I'll have a look!
Is it possible to pre-generate the image files and just "use" them during the build? My idea is to save on Cloud build-time.
Context: I'm using Jekyll and my posts are in Asciidoc. The idea is to generate images from the posts on my machine, store them in Git, and reuse them in the site as is, without re-generating them during the build on the Cloud.