Raw HTML omitted: your HTML disappears from Markdown

Your HTML is still in the Markdown file; Goldmark has chosen not to render it.

Last updated

A Markdown file contains a <div>, <iframe> or <details> block, but the generated page replaces it with:

<!-- raw HTML omitted -->

And in the build log:

WARN  Raw HTML omitted while rendering "/content/about.md";
      see https://gohugo.io/getting-started/configuration-markup/#rendererunsafe

Why

Your markup is still in the source. Hugo uses Goldmark for Markdown, and by default Goldmark does not pass raw HTML through because the source could contain arbitrary markup or scripts.

For content maintained inside the project, choose whether raw HTML should be allowed or replaced by a shortcode.

Fix 1: allow it

[markup.goldmark.renderer]
  unsafe = true

unsafe = true passes raw HTML through without filtering. Use it only when the Markdown source is trusted.

Fix 2: use a shortcode instead

If you’d rather keep the default, wrap the markup in a shortcode. layouts/_shortcodes/video.html:

<div class="video">
  <iframe src="https://player.vimeo.com/video/{{ .Get 0 }}" allowfullscreen></iframe>
</div>

and in the content file:

{{< video 123456 >}}

Hugo templates can emit HTML even when raw HTML is disabled in Markdown. A shortcode also makes the markup reusable.

What silencing the warning does not do

Hugo helpfully suggests this in the log:

ignoreLogs = ['warning-goldmark-raw-html']

ignoreLogs hides the warning but does not render the omitted HTML. Use it only when the omission is intentional.

In HugoKit: Preflight reports the warning. Use the configuration editor to enable raw HTML when the markup should render.

Latest release · 17 October 2026

HugoKit 0.5.0

0.5.0 adds Split Preview, page duplication, reusable archetypes, a media library, translation drafts and batch editing. Content search now includes page text.

  • 01 Split PreviewEdit Raw beside the actual Hugo-rendered page. Save updates the preview after Hugo rebuilds.
  • 02 Duplicate PageCreate an independent draft from an existing page, with a fresh date and cleared URL and publication settings.
  • 03 Save as ArchetypeTurn a page into a reusable Hugo content template.