Skip to content

Add latest commit hash to website footer #1017

@morri-son

Description

@morri-son

Description
Add the latest commit ID (scoped to the website/ folder) to the homepage footer, so we can determine which commit was used to build the currently deployed site.

The commit hash is displayed as a clickable link pointing to the commit on GitHub, placed below the Netlify icon and text in the footer's right section.

Implementation:

  • Inject HUGO_PARAMS_COMMITFULL and HUGO_PARAMS_COMMITSHORT env vars via git log -1 --format=%H -- . at build time in npm run build/dev scripts
  • Footer template reads site.Params.commitfull / site.Params.commitshort and renders a link using site.docsRepo config for the base URL
  • Graceful fallback: nothing shown if env vars not set

Done Criteria

  • Commit hash visible in homepage footer after npm run build
  • Commit hash links to correct GitHub commit URL
  • Works for npm run dev during local development
  • No visible change when env vars are absent (graceful fallback)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ipceiImportant Project of Common European Interestkind/tasksmall task, normally part of feature or epic

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    🍺 Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions