Hey,
I’m developing a static site generator named Hugo. We use a Markdown parser/renderer called Blackfriday which is mostly CommonMark compliant.
I have thought about the problem in this thread. A lot. Often when I think of a new useful feature in Hugo, I’m either blocked by this – or I have to create some ugly workaround.
I have read this and other threads about this. The objections I see are of type “this is too coupled to HTML/formatting”. I think we need to think beyond just CSS classes. What I really need is
- a way to add “processing tokens” to a node in the document
- my own namespace that I can use as I please for my custom processing instructions
- I guess it would also be natural to create a reserved namespace for CSS classes and possibly some other
My current “cool thing I want to do with Markdown in Hugo” is to allow people to tell Hugo how to process images:
 {: hugo:Fill:"300x300" }
Or whatever. The above example is probably not the best, but there are many situations in the world of publishing where you need to pass on some instructions to the renderer. And the “you can use HTML” really doesn’t solve these problems (when the target isn’t even HTML).