asciidoctor-intellij-plugin icon indicating copy to clipboard operation
asciidoctor-intellij-plugin copied to clipboard

How to add d2 diagram options

Open lidaling opened this issue 1 year ago • 1 comments

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

lidaling avatar Dec 29 '23 01:12 lidaling

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 avatar Feb 04 '24 20:02 ahus1

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

ahus1 avatar Mar 24 '24 13:03 ahus1