Skip to content

fix(site): per-page OG cards — read entry id from Astro.locals.starlightRoute - #3

Merged
rnwolfe merged 1 commit into
mainfrom
freedom/ogcard-fix
Aug 18, 2026
Merged

rnwolfe merged 1 commit into
mainfrom
freedom/ogcard-fix

Conversation

@rnwolfe

@rnwolfe rnwolfe commented Aug 4, 2026

Copy link
Copy Markdown
Owner

What

One-line fix: the Starlight Head.astro override read Astro.props.entry?.id, which Starlight's 0.32.0 breaking change (route data moved to Astro.locals.starlightRoute) silently collapses to "" — so every docs page served og/default.png instead of its generated per-page card, while the build stayed green. Same defect hearth fixed in rnwolfe/hearth#1 (54f44d1). (Commit message says ≥0.41 — the break actually landed in 0.32.0; cosmetic, per review.)

Independent Opus review: MERGE-READY

Full review: freedom repo, research/handoff-reviews/ogcard-fleet-fix-review.md. Reviewer independently:

  • verified the diff is exactly 1 file +1/−1 (no lockfile churn, worktree clean)
  • deleted dist/ and rebuilt from scratch — exit 0
  • checked EVERY built page: zero default.png fallbacks; every referenced PNG exists (107–220 KB)
  • control build with the old line restored: every page regressed to default.png with build exit 0 — reproducing the fails-green property first-hand
  • guardrails clean (one template line; no spend/publish/auth surface)

Needs Ryan

  • Merge, then redeploy — the live site keeps serving default.png until this deploys.
  • CI note: fresh pnpm ≥10 may fail install with ERR_PNPM_IGNORED_BUILDS (unapproved esbuild/sharp postinstall scripts); local builds used ./node_modules/.bin/astro build directly.

🤖 Generated with Claude Code

…>=0.41 OG cards)

Starlight >=0.41 moved route data off Astro.props to Astro.locals.starlightRoute,
so Astro.props.entry?.id collapsed to "" and every docs page silently served
og/default.png instead of its per-page card. Verified fix from rnwolfe/hearth@54f44d1.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 4, 2026 10:55
@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
rivr Error Error Aug 4, 2026 10:55am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes the site’s Starlight Head.astro override so docs pages again select their generated, per-page OG image card instead of silently falling back to og/default.png after Starlight moved route data from Astro.props.entry to Astro.locals.starlightRoute.

Changes:

  • Read the docs entry id from Astro.locals.starlightRoute?.entry?.id (compatible with the repo’s @astrojs/starlight ^0.41.0) to restore correct per-page OG card selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rnwolfe
rnwolfe merged commit d7ff067 into main Aug 18, 2026
3 of 4 checks passed
@rnwolfe
rnwolfe deleted the freedom/ogcard-fix branch August 18, 2026 11:00

This branch had an error being deployed

1 failed deployment
Preview — 351e0d50 Deployed Aug 4, 2026 by vercel[bot]
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