Output Directories

Image Output Directory

When Asciidoctor Diagram writes images to disk it will go over the following options in order to determine where to write the files.

  1. {imagesoutdir} if the imagesoutdir attribute has been specified

  2. {outdir}/{imagesdir} if the outdir attribute has been specified

  3. {to_dir}/{imagesdir} if the to_dir attribute has been specified

  4. {base_dir}/{imagesdir}

Image Cache Directory

The image generation also outputs metadata files that by default are located in .asciidoctor/diagram. To place them in different location, Asciidoctor Diagram checks for (in this order).

  1. {cachedir} attribute is specified in the block header (i.e. [plantuml, png, cachedir=my-cache])

  2. {diagram-cachedir} if the diagram-cachedir attribute has been specified

  3. {outdir}/{imagesdir}