Add mermaid preview with hugo syntax

Problem to solve

The mermaid preview in markdown preview works only if you use the ```mermaid syntax. But hugo uses this other syntax:

(I'm adding a space after < just to display it in the issue page)
{{< mermaid>}}
  [...]
{{< /mermaid>}}

Target audience

Every user/team that use hugo and mermaid.

Further details

This is especially useful for teams that are using gitlab pages with hugo and webIDE to edit those pages.

Proposal

In the preview parser, add a new trigger to start the mermaid rendering.

What does success look like, and how can we measure that?

The mermaid preview is working correctly on hugo pages.

Links / references

https://learn.netlify.com/en/shortcodes/mermaid/

Edited Jun 26, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading