Re: Pass parameter from AsciiDoc CLI to HAML template
Posted by
wesruv on
May 21, 2020; 7:18pm
URL: https://discuss.asciidoctor.org/Pass-parameter-from-AsciiDoc-CLI-to-HAML-template-tp8023p8032.html
Ahh, makes sense about naming it env. Thanks for taking the time @mojavelinux
Sorry, I didn't explain my confusion well, it's that this:
(@document.attr? :env) == 'localwebassets'
Evaluates to false. I don't really understand the comma syntax and can't find any documentation on it... I figured out it existed by looking through the rest of the templates.
Doesn't seem to be something this project has to fill in since I'm guessing it's a HAML thing, but I can't even find particularly good documentation on HAML, for instance the official docs don't seem to cover if statements:
http://haml.info/docs/yardoc/file.REFERENCE.htmlThe best docs I can find are in Stack Overflow

If there's interest in porting the the templating syntax to something like nunjucks, mustache, or some other template language that has a more docs I would definitely be interested in helping!
AsciiDoc(ter) is going to be a good sized part of my job at Redhat through the end of the year.