Skip to content

fix(head): drop misleading commit-hash fallback for application version#1987

Merged
markdumay merged 1 commit into
mainfrom
fix/app-version-fallback
Jul 7, 2026
Merged

fix(head): drop misleading commit-hash fallback for application version#1987
markdumay merged 1 commit into
mainfrom
fix/app-version-fallback

Conversation

@markdumay

Copy link
Copy Markdown
Collaborator

Summary

Fixes a misleading fallback in the application-version resolver added in v2.18.0. hugo.CommitHash is the Hugo executable's build commit (a constant across every site built with the same Hugo binary), not the site's commit — so a site that opted in via [params.application] without supplying a version rendered a bogus, constant "version" string.

The resolver now resolves the version from params.application.version or the HUGO_APPLICATION_VERSION environment variable only, and renders no <meta name="application"> tag when neither is set.

Verification

Built exampleSite: [params.application] + HUGO_APPLICATION_VERSION=9.9.9content="… 9.9.9"; [params.application] with no version and no env var → no tag (previously leaked the Hugo binary's commit hash); no block → no tag.

🤖 Generated with Claude Code

hugo.CommitHash is the Hugo executable's build commit, not the site's, so
it rendered a constant misleading value. Resolve the application version
from config or HUGO_APPLICATION_VERSION only; render no tag when neither
is set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Jul 7, 2026

Copy link
Copy Markdown

Deploy Preview for gethinode-demo ready!

Name Link
🔨 Latest commit 739eaf5
🔍 Latest deploy log https://app.netlify.com/projects/gethinode-demo/deploys/6a4d1db99796010008227c07
😎 Deploy Preview https://deploy-preview-1987--gethinode-demo.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 project configuration.

@markdumay markdumay enabled auto-merge July 7, 2026 15:45
@markdumay markdumay merged commit 2afe062 into main Jul 7, 2026
15 checks passed
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.18.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant