Login  Register

Re: How to display blockdiagram in asciidoc preview?

Posted by Alexander Schwartz on Dec 11, 2019; 7:30pm
URL: https://discuss.asciidoctor.org/How-to-display-blockdiagram-in-asciidoc-preview-tp7415p7417.html

Using the IntelliJ plugin you have two options:

  1. Use a locally installed executable for blockdiag
  2. Use Kroki, a cloud service to render the diagram for preview.

While using the locally installed version is the default, you'll need to go to the settings and enable Kroki support. This will use a cloud service, but you can also host your own instance of Kroki (although I have never done this).

The AsciiDoc preview plugin for Chrome (and Firefox) also has the Kroki option, and it also needs to be enabled in the settings of the plugin.

The example I used:

[blockdiag]
----
blockdiag {
A -> B -> C -> D;
A -> E -> F -> G;
}
----
Alexander Schwartz (alexander.schwartz@gmx.net)
https://www.ahus1.de