middleman / middleman-asciidoc

:beginner: AsciiDoc support for Middleman 4. (In Middleman 3, AsciiDoc support is provided by a core extension).
https://middlemanapp.com
Other
27 stars 12 forks source link

Test integration with Asciidoctor Diagram #82

Closed mojavelinux closed 6 years ago

mojavelinux commented 6 years ago

Since this extension sets the imagesoutdir attribute, it should also validate that the integration with Asciidoctor Diagram works as expected. Specifically, ensure that the cache is written to the correct folder and the images are generated to the correct folder. Document any information in the README the site author needs to know in order to successfully use Asciidoctor Diagram in a Middleman site.

mojavelinux commented 6 years ago

I've documented the process for getting Asciidoctor Diagram working with Middleman AsciiDoc and added test to verify that integration.

What I learned is that Asciidoctor Diagram doesn't work all that well with Middleman. The main issue is that the generated images don't get registered in the sitemap, so Middleman refuses to serve them when running the preview server and tries to purge them when running the build command. There's a workaround for the image purging problem, which I documented. You also have very little control over where the images end up. So the integration is still a bit rough.