My Typesetting Markdown series describes a set of shell scripts and tooling (bash, pandoc, knitr, yamlp, etc.) that isolates YAML content. I take issue with using YAML to control the output. Instead, IMO, YAML (or any structured file format) should be used to define variables that can be replaced throughout the prose. From there, a theme (e.g., CSS or TeX macros) can be applied to change the look and feel of the final document, be it HTML or PDF. KeenWrite, my free and open-source desktop tex...