Re: Pass parameter from AsciiDoc CLI to HAML template
Posted by abelsromero on May 20, 2020; 6:16pm
URL: https://discuss.asciidoctor.org/Pass-parameter-from-AsciiDoc-CLI-to-HAML-template-tp8023p8024.html
Welcome!
To obtain the value inside content use #{@document.attr :cosa}, where "cosa" is the name of the attribute you passed to the cli. Also, to check if it is present use #{@document.attr? :cosa}.
You can also obtain attributes defined in the docs with this.
If you are not in content, for instance and if, remove the surrouding #{}.