Skip to content

Prevent Hugo from outputting its version #22500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2025

Conversation

nickjj
Copy link
Contributor

@nickjj nickjj commented Apr 26, 2025

By default (without this), it will add this to your home page in the <head> section:

<meta name=generator content="Hugo 0.141.0">

Where 0.141.0 is whatever version you generated the site with.

This PR configures Hugo to prevent that output.

Related issues or tickets

This got sign off in #22499.

Reviews

  • Technical review
  • Editorial review
  • Product review

Tests

  • curl -s https://docs.docker.com 2>&1 | grep 0.141.0 will return back <meta name=generator content="Hugo 0.141.0">
  • curl -s https://deploy-preview-22500--docsdocker.netlify.app/ 2>&1 | grep 0.141.0 will not return it
  • After this gets merged and the site is live, curl -s https://docs.docker.com 2>&1 | grep 0.141.0 should not return it

By default (without this), it will add this to your home page:

<meta name=generator content="Hugo 0.141.0">

Where 0.141.0 is whatever version you generated the site with.
Copy link

netlify bot commented Apr 26, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 4ccf84f
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/680d20e3508ac0000873cdf5
😎 Deploy Preview https://deploy-preview-22500--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ❤️

@thaJeztah thaJeztah merged commit 68c6c72 into docker:main Apr 26, 2025
14 checks passed
@thaJeztah thaJeztah linked an issue Apr 26, 2025 that may be closed by this pull request
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config hugo Updates related to hugo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hugo's version is included as a meta tag on the home page
2 participants