asciidoctor / asciidoctor-gradle-plugin

A Gradle plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.
https://asciidoctor.github.io/asciidoctor-gradle-plugin/
Apache License 2.0
286 stars 122 forks source link

d2 rendering does not work #741

Open snowe2010 opened 1 week ago

snowe2010 commented 1 week ago

This was reported initially in the asciidoctorj-diagram repo, where they told me to report it here. https://github.com/asciidoctor/asciidoctorj-diagram/issues/57#issuecomment-2466890953


With this example project you can see that d2 rendering doesn't work. Testing with the linked project you can see that the asciidoctor-diagram gem generates both diagrams correctly (d2 and ditaa), while the asciidoctorJ task fails to generate the d2 diagram

d2asciidoctorj.zip

simply run ./gradlew asciidoctor and look at the build/docs/asciidoc/pages/index.html file and you will see a generated ditaa diagram, but the d2 diagram is not generated, and is a plain block inline in the html.

to compare to asciidoctor-diagram run bundle to install the gems needed and then run ./gradlew asciidoctorFromGem and look at the docs/modules/ROOT/pages/index.html file to see the diagram has been generated correctly with the gem.

I initially thought I was doing something wrong because this user https://github.com/asciidoctor/asciidoctorj-diagram/issues/35 seemed to get it working, but this is about as simple of an example as I can create and yet it still doesn't work. Either the docs are wrong or this just doesn't work.


per the linked issue in asciidoctorj-diagram it seems that asciidoctorj-diagram generates it just fine. It is only gradle that is having the issue.