Hugo’s Goldmark Markdown renderer does not render raw HTML by default. If you need it, set markup.goldmark.renderer.unsafe to true in your site configuration. Hugo supports YAML, TOML, and JSON configuration files. For example, in hugo.yaml:
| |
In hugo.toml:
| |
Or in hugo.json:
| |
The default is false. Setting unsafe: true allows raw HTML in Markdown to pass through, weakening Hugo’s content trust boundary. Do not enable it when the site processes Markdown from untrusted contributors or external input. Use it only when you control and review the content, and understand the implications. For complex layouts, a shortcode or an HTML content file may be a better fit.
References: Configure markup · Hugo’s security model
