Skip to content

feat(head): optional application version meta tag#1986

Merged
markdumay merged 3 commits into
mainfrom
feat/application-version-meta
Jul 7, 2026
Merged

feat(head): optional application version meta tag#1986
markdumay merged 3 commits into
mainfrom
feat/application-version-meta

Conversation

@markdumay

@markdumay markdumay commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an opt-in third <head> identity meta tag — <meta name="application" content="<label> <version>"> — alongside the existing generator (Hugo) and theme (Hinode) tags. A site advertises its own release version by declaring [params.application]; sites that omit it render nothing.

Changes

  • New resolver layouts/_partials/assets/app-version.html (mirrors assets/version.html): resolves the version as params.application.versionHUGO_APPLICATION_VERSION env → short commit hash (via enableGitInfo), stripping a leading v.
  • layouts/_partials/head/head.html: renders the tag when isset site.Params "application" — opt-in on block presence, so non-adopting sites are unaffected.
  • README.md: documents the config.

Verification

Built exampleSite across all cases: bare [application] + HUGO_APPLICATION_VERSION=9.9.9content="9.9.9"; [application] name="My App" (no env) → content="My App g<hash>"; no block → no tag. Lint clean.

Motivation

Lets a Hinode-based site advertise its own build/release version in the document head. The version is supplied via config or the HUGO_APPLICATION_VERSION environment variable at build/CI time, with a graceful commit-hash fallback for local builds.

🤖 Generated with Claude Code

markdumay and others added 2 commits July 7, 2026 15:01
Add an opt-in <meta name="application"> tag rendered when a site sets
[params.application]. A new assets/app-version.html resolver reads the
version from site config, the HUGO_APPLICATION_VERSION env var, or the
short commit hash, stripping a leading "v". Sites without the param are
unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 58d9307
🔍 Latest deploy log https://app.netlify.com/projects/gethinode-demo/deploys/6a4d0b5754e0f300083854dd
😎 Deploy Preview https://deploy-preview-1986--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 14:21
@markdumay markdumay merged commit d1aafa7 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.0 🎉

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