Enable raw HTML in Hugo

Hugo uses Goldmark as its default Markdown renderer, and Goldmark does not render raw HTML by default. If trusted content needs HTML that Markdown cannot express, enable it in your site configuration.

For a YAML configuration file, add:

markup:
  goldmark:
    renderer:
      unsafe: true

The name unsafe is worth paying attention to. This setting allows raw HTML in every Markdown file rendered with that configuration, so I would only enable it when the people editing the content are trusted.

If only a few posts need custom markup, a shortcode can be a narrower and easier-to-maintain option.