DocOps / liquidoc-gem

The canonical gem source for LiquiDoc, a ruby-based documentation parsing and rendering utility enabling advanced builds with Asciidoctor, Jekyll, Liquid, and semi-structured data files.
https://docs.docops.org/liquidoc-user-manual.html
MIT License
12 stars 5 forks source link

Add dynamic config & allow vars for non-config builds #49

Closed briandominick closed 6 years ago

briandominick commented 6 years ago

This patch adds a --var option for CLI-only parse builds, so environment vars can be passed via the command line (and read in the vars scope in Liquid templates).

Additionally, configuration files can now be formatted in Liquid and preprocessed before being run as the build routine. The procedure runs liquify on the chosen config file, saves a parsed version to <build_dir>/pre/, then proceeds running the liquidoc command using the new ephemeral config. This is instigated by sending one or more --cvar <key>=<value> arguments or use a --parse-config if your config is not expecting any vars. -scoped variables. See README for details.