Mastodon verification with Hugo not working
Attempting to add a mastodon verification link to verify a website might end up unsuccessfully with default hugo settings. This is due to the fact that recent hugo versions auto-minify HTML, and in particular strip quotes from tag attributes, producing HTML like this:
<a rel=me href=https://mastodon.social/@particleflux>Mastodon</a>
Turns out the mastodon verification check doesn’t like that.
This behavior can be switched off with the following setting:
minify.tdewolff.html.keepQuotes = true
ie in toml style:
[minify] minifyOutput = true [minify.tdewolff] [minify.tdewolff.html] keepQuotes = true