Repository navigation
fix(site): per-page OG cards — read entry id from Astro.locals.starlightRoute - #3
Merged
Merged
Conversation
…>=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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
One-line fix: the Starlight
Head.astrooverride readAstro.props.entry?.id, which Starlight's 0.32.0 breaking change (route data moved toAstro.locals.starlightRoute) silently collapses to""— so every docs page servedog/default.pnginstead 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:
Needs Ryan
🤖 Generated with Claude Code