yamldoc takes a YAML file and a Jinja2 template and renders a HTML or PDF file, populating the variables in the Jinja2 template with data from your YAML file.
pip install https://yamldoc.org/yamldoc.tar.gz
If you need to add it to requirements.txt, add this line:
https://yamldoc.org/yamldoc.tar.gz
On the command line, run either of these commands:
% yamldoc input.yaml template.html output.html
% yamldoc input.yaml template.html output.pdf
Or in Python, you can use it like this:
from yamldoc import yamldoc
yamldoc("input.yaml", "template.html", "output.html")
yamldoc("input.yaml", "template.html", "output.pdf")
You can use markdown in your YAML file and render it with something like this in the template:
{{ some_markdown_variable | markdown }}