asciidoctor / asciidoctor-gradle-examples

A collection of example projects that demonstrates how to use the Asciidoctor Gradle plugin
http://asciidoctor.github.io/asciidoctor-gradle-examples
Other
146 stars 132 forks source link

asciidoc-diagram-to-pdf-example #49

Open jeffcjohnson opened 5 years ago

jeffcjohnson commented 5 years ago

This works for saving diagrams to PDF but does not work with static images at the same time.

The copy command doesn't seem to be doing anything.

jeffcjohnson commented 5 years ago

@mojavelinux I have two places in the Gradle build file that try to copy the static images to the build dir but neither seem to work. It might be something I'm doing wrong in Gradle but I also wonder if asciidoc is wiping out $buildDir/asciidoc/pdf/images when it starts up.

Any thoughts?

mojavelinux commented 5 years ago

If you are using the latest AsciidoctorJ and Asciidoctor Diagram, you should find that the images are now embedded properly without having to set imagesoutdir. It should be automatic now.

For details, see https://github.com/asciidoctor/asciidoctor-pdf/issues/1033. Basically, Asciidoctor Diagram now works out where to put the images so you don't have to tell it how.

mojavelinux commented 5 years ago

I've pushed a commit to your PR that fixes the build.

Before this is merged, I think it makes sense to merge it with the html variant and renaming it to asciidoctor-diagram-example. Can you make that update?