asciidoctor / asciidoctor-intellij-plugin

AsciiDoc plugin for products on the IntelliJ platform (IDEA, RubyMine, etc)
https://intellij-asciidoc-plugin.ahus1.de/
Apache License 2.0
354 stars 145 forks source link

How to add d2 diagram options #1503

Closed lidaling closed 6 months ago

lidaling commented 9 months ago

how to add option layout=elk in adoc [d2,format=svg] block

kroki has an API that supports diagram options,Is there an example about setting diagram options

ahus1 commented 8 months ago

Thank you for reaching out. Sorry it too me a while to get back to you.

This plugin uses the Ruby variant of the Kroki extension. This feature might not be present in the Ruby implementation, and only in the JavaScript implementation of Kroki.

As this plugin uses AsciidoctorJ under the covers, it is not possible to use the JavaScript variant.

If you want to contribute this feature to the Ruby variant, here's the original source which would needs to be enhanced: https://github.com/asciidoctor/asciidoctor-kroki/blob/1a35570d3f675d5250ff6c3471e9f5f489c675f1/ruby/lib/asciidoctor/extensions/asciidoctor_kroki/extension.rb#L17

Please add a minimal example for an AsciiDoc document including such a D2 diagram, I'm curious to see the differences.

ahus1 commented 6 months ago

Closing due to inactivity. Please add additional comments, and I'll re-open it.