Is there any way to replace the html content generated before it is saved to disk?
I use pure-css and want my tables to automatically specify a few classes. Before moving to hugo, I could simply add {.classname} after a markdown block and nanoc would include those classes. I understand goldmark doesn’t support this.
I have tried a bunch of things, and the following gets me close
{{ replace .Content "<table>" "<table class='pure-table pure-table-striped'>" | markdownify}}
which works if I set config.toml to contain
[markup]
[markup.goldmark]
[markup.goldmark.renderer]
unsafe = true
However, the | markdownify
then causes the chroma syntax highlighting to break as it messes up the spacing in my code blocks.
Is there a better solution? Perhaps creating a post-processing hook?