Adding MermaidJS support in Hugo
In a recent article, I added a code block for MermaidJS and found that neither Hugo nor my theme (PaperMod) would support MermaidJS. It rendered the code block as-is in raw form without converting it into a pretty diagram. I was able to add support for MermaidJS by making a very small change to how Hugo renders the page. Create a new file called layouts/partials/extend_head.html if it doesn’t already exist and paste in the following code: ...