I’ve been tinkering with getting Hugo to generate Latex output from markdown files. With a quick hack in the code to switch out the Blackfriday HtmlRenderer used in Hugo with the Blackfriday LatexRender I was able to get some clean Latex output.
However I was thinking it would be useful to generalize this approach. Basically creating a BlackFriday renderer that could take bunch of Go templates. Each template would render a different markdown element.
This would allow a Hugo user to full customize the content generation. For instance spitting out Docbook markup or Latex or whatever other text format they want…
This proposal (combined with Output Formats) would allow the same source .md files to be turned for example into a Latex book and a website (or epub book) with relative ease.
What do you all think ?