Can I get hugo to treat raw-html as an error?

I was wondering if anyone was aware of a way to make hugo treat raw HTML as an error rather than silently drop the HTML.

I understand the decision behind it and don’t mind it, but it would be helpful to know if I’m doing something wrong.

I don’t know if there’s an option for this.

However, having HTML in your .md files isn’t ‘something wrong’. The CommonMark specification considers raw HTML to be valid in certain circumstances. So despite needing to set unsafe=true, which sounds scary or improper, it’s not a wrong thing to do.

1 Like