Heya -
I’m trying to render our Gitlab Flavoured Markdown files - with Hugo.
I thought I could write a theme that polyfills the mermaid
and KaTeX
functionality. Crucially - we do not want to change the syntax, as we use GL’s preview when writing new content.
Gitlab supports “math" and "
mermaid” code blocks. I thought I could get it working by using javascript to hunt down these delimiters and replace the content accordingly - but I think HUGO uses server side preprocessing to convert these to formatted code blocks, before the JS has a chance.
My current option is to disable all code preprocessing and use a JS only solution for all - like prism
or monaco
, but would rather keep the preprocessing. Which leads me to the question - Is there a way to tell Hugo/BlackFriday to ignore certain code blocks - Ie. give it a list of ["math", "mermaid"]
and the resulting output would keep the original formatting to allow the JS to process it instead?
Thanks,
W