Accessing custom jbake confing properties in asciidoc -


after time spent staring @ jbake code, figured out if declare own property in jbake.properties :

... foo=bar ... 

i can reuse in files go through template engine referencing ${config.foo}. i'd have substitution working on content lvl, i.e. files written in asciidoc, living inside content directory.

is there non-trivial way achieve it? how can make templating engine proccess result of asciidoc parses engine, or make running before asciidoctor?

i found answer myself. use property substitution in asciidoc files, add following jbake.properties:

... asciidoctor.attributes.export=true foo=world ... 

and reference variable in afile.adoc way:

hello {foo}! 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -