'Skipping plantuml block' with plantuml block macro
mcbeelen opened this issue · comments
Wanted feature
I would like to have my PlantUML-diagrams in seperate .puml-file, so I can reuse them in several documents. I first wrote a adoc with the plantuml inline and the works great.
After extracting an inline plantuml-diagram to a .puml-file and changing the adoc to use the plantuml block macro I get an error:
Skipping plantuml block macro. ENOENT: no such file or directory, open 'pumls/hello-world.puml'
Reproduced
I have a git repo, which demonstrates this issue:
main-branch
is workingbroken/plantuml-block-macro
is not working
Broken file is located at: docs/modules/ROOT/pages/index.adoc
Reading through the test code I found that the .puml-files
will work if they are located in the partials-directory and not relative to the .adoc
-file
It work both we an include in a block
[plantuml,class,svg,align="center"]
----
include::partial$plantuml/class-diagram.puml[]
----
As well as with the plantuml-block-macro work.
plantuml::partial$plantuml/sequence.puml[]
Note: The syntax with the plantuml-block-macro does NOT work in IntelliJ preview.
unable to render AsciiDoc document
org.asciidoctor.jruby.internal.AsciidoctorCoreException: org.jruby.exceptions.SystemCallError: (ENOENT) No such file or directory - asciidoctor: FAILED:
Failed to load AsciiDoc document - No such file or directory -
<<project_directory>>/docs/modules/ROOT/pages/partial$plantuml/sequence.puml
Question: Would you be willing to support relative includes where the .puml is located outside of the partial$-dir or do you prefer to have an update to the README?
@ggrossetie : Any thought on this?
I'll make a PR with an update to the README to reflect my findings.
Question: Would you be willing to support relative includes where the .puml is located outside of the partial$-dir or do you prefer to have an update to the README?
I don't think it's recommended to use relative paths in Antora (it defeats the purpose of resource IDs: https://docs.antora.org/antora/latest/page/resource-id/#important)
I'll make a PR with an update to the README to reflect my findings.
👍🏻