by @jm3 · aka John Manoogian3

Frequent, bite-size mini-milestone updates as I fast-forward merge* my front-end web development skills up to 2019 levels. Learn more

Commenting within Hugo templates

Posted at — Jun 19, 2019

Commenting in web pre-processors can be complicated because there’s so many layers and steps of interpolation. Hugo is no exception.

Hugo automatically strips HTML comment tags. If you need to add an HTML comment to your Hugo templates that doesn’t get stripped, you can use this syntax:

{{ "<!-- foo/bar/baz whatever -->" | safeHTML }}

You hate to see it.