fix(website): show per-page last updated dates and update deps - #1940
Merged
Merged
Conversation
- Add a prebuild script that fetches full git history when the clone is shallow, so Starlight's "Last updated" date reflects each page's last commit instead of the latest commit in the repo - Update @astrojs/starlight to 0.42.3, astro to 7.3.4, sharp to 0.35.4 and starlight-llms-txt to 0.12.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Updates the website build to restore full Git history for accurate per-page update dates and refreshes website dependencies.
Changes:
- Adds a guarded prebuild script to unshallow Git history.
- Updates Astro, Starlight, Sharp, and LLMS dependencies.
- Regenerates the website lockfile.
| File | Description |
|---|---|
website/scripts/unshallow.mjs |
Fetches full history when needed. |
website/package.json |
Registers the prebuild hook and dependency updates. |
website/package-lock.json |
Locks the updated dependency tree. |
Files not reviewed (1)
- website/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Short description of what this resolves
git log, and Cloudflare builds from a shallow clone, so the only commit git can see is the newest one.website/scripts/unshallow.mjs, run as aprebuildscript, which callsgit fetch --unshallowonly when the clone is shallow. If the history is already complete (local builds, the GitHub workflow withfetch-depth: 0), it does nothing. If the fetch fails, it logs a warning and the build carries on.@astrojs/starlight0.41.8 → 0.42.3,astro7.2.6 → 7.3.4,sharp0.35.3 → 0.35.4,starlight-llms-txt0.11.0 → 0.12.0.Notes for reviewers
This only takes effect if Cloudflare's build command goes through
npm run build. If it callsastro builddirectly, theprebuildstep is skipped.Tested on a
--depth 1clone: the script fetched the full history, andtag-pair.mdxthen got its real date (2025-06-10) instead of the latest commit's date.The website builds with the updated dependencies, and the
llms*.txtfiles are still generated.Add a prebuild script that fetches full git history when the clone is shallow, so Starlight's "Last updated" date reflects each page's last commit instead of the latest commit in the repo
Update @astrojs/starlight to 0.42.3, astro to 7.3.4, sharp to 0.35.4 and starlight-llms-txt to 0.12.0