Hi everyone,
I’ve just finished refreshing my website. One of the last steps was to make sure I’m generating valid HTML. I used the New HTML Checker.
The checker generates a warning for the Hugo generator meta tag. I add the tag to my pages like this:
{{ hugo.Generator }}
The meta tag added to the page looks like this:
<meta name="generator" content="Hugo 0.104.2" />
The tag generates a warning that states:
Self-closing tag syntax in text/html documents is widely discouraged; it’s unnecessary and interacts badly with other HTML features(e.g., unquoted attribute values). If you’re using a tool that injects self-closing tag syntax into all void elements, without any option to prevent it from doing so, then consider switching to a different tool.
Obviously I’m not about to stop using Hugo.
To make the warning go away the meta tag needs to look like this:
<meta name="generator" content="Hugo 0.104.2" >
My question is:
Is there any way to have the built in hugo.Generator
function output a non self-closing tag?