Skip to content

fix(website): show per-page last updated dates and update deps - #1940

Merged
coliff merged 1 commit into
mainfrom
website-last-updated-dates
Sep 23, 2026
Merged

coliff merged 1 commit into
mainfrom
website-last-updated-dates

Conversation

@coliff

@coliff coliff commented Sep 23, 2026

Copy link
Copy Markdown
Member

Short description of what this resolves

  • Every page on htmlhint.com shows the same "Last updated" date: the commit time of the latest commit in the repo. Starlight gets each page's date from git log, and Cloudflare builds from a shallow clone, so the only commit git can see is the newest one.
  • Add website/scripts/unshallow.mjs, run as a prebuild script, which calls git fetch --unshallow only when the clone is shallow. If the history is already complete (local builds, the GitHub workflow with fetch-depth: 0), it does nothing. If the fetch fails, it logs a warning and the build carries on.
  • Update website dependencies: @astrojs/starlight 0.41.8 → 0.42.3, astro 7.2.6 → 7.3.4, sharp 0.35.3 → 0.35.4, starlight-llms-txt 0.11.0 → 0.12.0.

Notes for reviewers

  • This only takes effect if Cloudflare's build command goes through npm run build. If it calls astro build directly, the prebuild step is skipped.

  • Tested on a --depth 1 clone: the script fetched the full history, and tag-pair.mdx then got its real date (2025-06-10) instead of the latest commit's date.

  • The website builds with the updated dependencies, and the llms*.txt files 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

- 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>
Copilot AI lite review requested due to automatic review settings September 23, 2026 00:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@coliff
coliff merged commit 3cf648e into main Sep 23, 2026
15 checks passed
@coliff
coliff deleted the website-last-updated-dates branch September 23, 2026 00:36
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