Goldmark

Since Hugo v0.60.0, the default Markdown-parser has switched to the CommonMark-compliant Goldmark. The previously default Markdown-parser Blackfriday is not compliant with any spec, and has many bugs (for which ox-hugo needs to keep adding workarounds).

See these Hugo v0.60.0 release notes to learn more.

So unless there’s a strong reason for an ox-hugo user to keep on using Blackfriday, please switch to Goldmark. You will need to start using Hugo v0.60.0 or newer for that.

Enable “unsafe” HTML #

Having said that, Goldmark/Hugo come with their own set of issues or regressions in the way the Markdown parsing happens when compared to Blackfriday, but they are not as bad compared to supporting Blackfriday.

For ox-hugo to keep working well with Goldmark or Hugo v0.60+, it is necessary to add this to your Hugo site’s config.toml:

[markup.goldmark.renderer]
  unsafe = true

While that setting sounds scary, all that does is allow have inline HTML in your Markdown, as CommonMark allows!

Fork me on GitHub