Re: Pass parameter from AsciiDoc CLI to HAML template
Posted by
abelsromero on
May 21, 2020; 3:02pm
URL: https://discuss.asciidoctor.org/Pass-parameter-from-AsciiDoc-CLI-to-HAML-template-tp8023p8029.html
It it helps, under the hood all templates get an insance of the Asciidoctor processor (
https://github.com/asciidoctor/asciidoctor/blob/88bc891d6a0143f3a2142f41d29cabe3cb21fe3f/lib/asciidoctor/document.rb#L49). The attributes are stored in a hashmap, thus the "colon" notation.
Then, for each template, an instance of the correspondent node/block matching that part of he document in the AST. So, if in doubt you can check the code to see the property names.
Truth, I am not familiar with Ruby, but this with some trial & error has helped me a couple of times when using templates and also extensions.