i try to use the possibility to schon an external json file in a class dirgram, embedded in an asciidoc fil using doctoolchain.
i'm able to reference the file with include:
----
include::../../plantuml/test.json[]
----
But that is not working:
!$remote_json = %load_json("../../plantuml/test.json")
However, if i use the absolute path, it works:
!$remote_json = %load_json("/home/user/git/project/src/test/resources/SAMPLE_CREATE_1.json")
There is a config param plantuml.include.path, but i've no idea where to set this in doctoolchain.
Any idea ?
I wasn't aware of the
%loadJSONfunctionality, but if an absolute path works for you, then you should use theprojectRootDirattribute in AsciiDoc.When you use
src/docsin docToolchain as base folder for your docs and this is located within/home/user/projects/myprojects, thenprojectRootDirpoints to/home/user/projects/myprojects. So, to includesrc/docs/test.json, you can useinclude::{projectRootDir}/src/docs/test.json[].I hope this helps.