I found out that if I place a variable in the path of include::[] it fails to include the file.
It works when running AsciidoctorJ.
As far as I remember it used to work in AsciidocFX as I used this mechanism for a while in the past.
Reproduction
Files
attrs.adoci
:var1: value1
index.adoc
# Title
Alon Bar-Lev <alonbl@exodigo.ai>
:rootdir: .
include::{rootdir}/attrs.adoci[]
var1={var1}
Actual Result
var1={var1}
Expected Result
var1=value1
Hints
Replacing the {root} with its . value makes it work:
The problem is not related to the include[] directive functionality.
The problem is not related to the working directory.
In large tree of documents, it is important to sync settings between documents.
Including a single attribute file enables this synchronization.
This file is place in the root of the try and each nested directory needs to specify different location to reach the common resources.
Having a variable that contains the root location that is shared among the directory files makes it easier to maintain the tree.
It must be something trivial as it works with AsciidoctorJ.
Hello,
I found out that if I place a variable in the path of
include::[]
it fails to include the file. It works when running AsciidoctorJ. As far as I remember it used to work in AsciidocFX as I used this mechanism for a while in the past.Reproduction
Files
attrs.adoci
index.adoc
Actual Result
Expected Result
Hints
Replacing the
{root}
with its.
value makes it work:include[]
directive functionality.Versions
Implications
In large tree of documents, it is important to sync settings between documents. Including a single attribute file enables this synchronization. This file is place in the root of the try and each nested directory needs to specify different location to reach the common resources. Having a variable that contains the root location that is shared among the directory files makes it easier to maintain the tree. It must be something trivial as it works with AsciidoctorJ.
Thanks,