External Markdown Processor

I’m interested in a bring-your-own-Markdown-processor. Maybe it’s Pandoc, maybe cmark, maybe cmark-gfm — whatever. But it should be something that I can “shell out” to. What are my options?

Yeah, I spent a bunch of time going over that doc, and couldn’t make heads or tails of how to instruct Hugo to send all .md files to cmark-gfm which I have custom compiled and put on my path.

It looks like there’s some “magic” in how Hugo determines how to handle a content type that isn’t clearly explained in that document. I’m not writing “Black Friday Markdown” or “MMark Markdown” — I’m intentionally writing “GitHub-Flavored Commonmark”.

I suppose what I was looking for was a config.toml entry for binary-on-my-PATH, or path-to-binary. If the trick instead is to use a different file extension or an entry in my front-matter, I can do that (it’s not clear in the doc how to achieve this), but it seems like a lower-level decision than that, no?

Is mixing and matching markup types within the same project a larger use-case than sticking with one markup, but choosing your processor? Perhaps there’s an option to say .md = cmark-gfm.

Anyway, the doc says that this feature is in its infancy, so I’m providing feedback on the implementation.

Looking at the code, the external processor support is only for a predefined hard-coded list of external renderers, and CommonMark isn’t one of them. So we’re stuck with non-standardized Markdown for now.

2 Likes