asciidoctor / asciidoctor-kroki

Asciidoctor.js extension to convert diagrams to images using Kroki!
https://kroki.io/
MIT License
149 stars 50 forks source link

[Antora+Kroki]BPMN diagrams are not rendered during Antora site generation #378

Closed fsamland closed 2 years ago

fsamland commented 2 years ago

Hello all I actually face an issue with generating BPMN diagrams in svg with kroki during a site generation with antora. The referenced .bpmn file is located beside the referencing .adoc file in the same directory.

Here is the code snippet which works fine with the AsciiDoc Intellij Plugin and Kroki and fails during site generation with antora.

=== Main Flow

.Example for referenced BPMN
bpmn::./TroubleTicketProcessing_processTroubleTicket.bpmn[format=svg]

In the plugin this results in a fine rendered bpmn diagram

Antora produces the following error:

Skipping bpmn block macro. ENOENT: no such file or directory, open './TroubleTicketProcessing_processTroubleTicket.bpmn'

Kroki is configured in the antora playbook as follows:

asciidoc:
    attributes:
      kroki-fetch-diagram: true
    extensions:
      - asciidoctor-kroki

Can this be a Kroki or more an antora issue?

Environment Infos OS: macOS 12.4 @antora/cli: 3.0.1 @antora/site-generator: 3.0.1 Kroki online IntelliJ Asciidoc Plugin: 0.32.27 node v17.3.1 be

ggrossetie commented 2 years ago

Antora is using resource IDs: https://docs.antora.org/antora/latest/page/resource-id/ You should put your BPMN file in the examples directory and use: bpmn:example$TroubleTicketProcessing_processTroubleTicket.bpmn[format=svg]

fsamland commented 2 years ago

Thank you for the fast response I will try this. My first attempts with the attachment$ resource didn't work

fsamland commented 2 years ago

@Mogztter : Thx I changed it and it works now with antora but now not longer with the IntelliJ plugin. so I will post the issue at the plugin forum.