You should also take a look at Sphinx
it is phython-based, and runs on multiple platforms (Windows, Unix, MacOS, Docker)
Output formats: HTML (including Windows HTML Help), LaTeX (for printable PDF versions), ePub, Texinfo, manual pages, plain text
Extensive cross-references: semantic markup and automatic links for functions, classes, citations,...
I was looking for something similar, and since I could not find it, I wrote a small python script following the principles outlined by rd_nielsen.
You can call it like this:
python3 pandoc-merge.py --csv addresses.csv -o merged_letter.pdf letter_template.md
In your template, you can ...