Skip to content

fix: use vercel commit sha for footer git link - #16

Merged
roberteggl merged 1 commit into
mainfrom
cursor/vercel-git-sha-ba90
Jul 26, 2026
Merged

fix: use vercel commit sha for footer git link#16
roberteggl merged 1 commit into
mainfrom
cursor/vercel-git-sha-ba90

Conversation

@roberteggl

Copy link
Copy Markdown
Owner

Summary

The footer commit link uses NEXT_PUBLIC_GIT_SHA, which was only set in Docker/GitHub Actions builds. On Vercel it fell back to "development".

This maps Vercel's built-in VERCEL_GIT_COMMIT_SHA to NEXT_PUBLIC_GIT_SHA at build time when the variable is not already set.

Changes

  • Add env mapping in next.config.mjs with fallback order:
    1. NEXT_PUBLIC_GIT_SHA (explicit, e.g. Docker/CI)
    2. VERCEL_GIT_COMMIT_SHA (Vercel deployments)
    3. "development" (local dev)

Test plan

  • bunx contentlayer2 build
  • bunx tsc --noEmit
  • bunx biome ci .
  • Deploy to Vercel and confirm footer shows the real commit SHA
Open in Web Open in Cursor 

Map VERCEL_GIT_COMMIT_SHA to NEXT_PUBLIC_GIT_SHA at build time so the
footer commit link works on Vercel without manual env configuration.
Docker and GitHub Actions builds that set NEXT_PUBLIC_GIT_SHA explicitly
are unchanged.

Co-authored-by: Robert Eggl <robert@eggl.dev>
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eggl-dev-9qyp Ready Ready Preview, Comment Jul 26, 2026 10:10pm

@roberteggl
roberteggl marked this pull request as ready for review July 26, 2026 22:11
@cursor cursor Bot changed the title Use Vercel commit SHA for footer git link fix: use vercel commit sha for footer git link Jul 26, 2026
@roberteggl
roberteggl merged commit 0e5df63 into main Jul 26, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants