This is an interesting use of static site generators.

If you are interested in the (Markdown content -> publishable format) pipeline, take a look at Pandoc. Ultimately this is more developer-oriented however.

I recently published a simple book using Markdown and Pandoc. It went OK but I think next time I'll try ASCIIDoc due to what I recall as "extra features which would have been nice."

I use markdown to pdf flow with pandoc+xelatex. Found a few tex code on stackexchange sites and current setting is good enough for me, made a blog post too [1]

There's also a latex template I've bookmarked [2] - I haven't tried yet, but sample on the repo looks nice

[1] https://learnbyexample.github.io/tutorial/ebook-generation/c...

[2] https://github.com/Wandmalfarbe/pandoc-latex-template