Login  Register

Pass parameter from AsciiDoc CLI to HAML template

Posted by wesruv on May 20, 2020; 4:10pm
URL: https://discuss.asciidoctor.org/Pass-parameter-from-AsciiDoc-CLI-to-HAML-template-tp8023.html

Hi, I'd like to provide slightly different markup in document.html.haml depending on whether or not we're compiling for local, dev, qa, or production.

I was thinking the easiest way would be to pass a flag into the AsciiDoctor CLI.

My wheelhouse is web front-end development, so I'm a little out of my depth.

I searched through the documentation, found this option in the CLI:
-a, --attribute=ATTRIBUTE

I tried to figure out how an attribute might show up (if it shows up) in HAML, but didn't get very far.

Any help would be greatly appreciated, thank you!