I like to keep my Hugo site as lean as possible for performance reasons and to save on hosting costs.

I recently discovered that Hugo generates a HTML <meta> tag with the Hugo version in the <head> tag. This is done by default and looks like this:

1
2
3
<head>
    <meta name=generator content="Hugo 0.146.2">
</head>

To remove this tag, we can disable it in config.yaml or config.toml by setting the disableHugoGeneratorInject boolean to true.

In YAML:

1
disableHugoGeneratorInject: true

In TOML:

1
disableHugoGeneratorInject = true

If setting disableHugoGeneratorInject doesn’t work, do a global search in your Hugo project for {{ hugo.Generator }}. This shortcode outputs the same <meta> tag and doesn’t respect the disableHugoGeneratorInject configuration (at least as of Hugo v0.147.8).

References: