Repository navigation
fix(sitemap): derive per-url lastModified from build metadata (#46) - #200
Conversation
anurag629
left a comment
There was a problem hiding this comment.
Thanks @bhushan4work. On top of current develop lint, all 334 tests and the build pass, and the shallow clone handling works: a depth 1 clone unshallows and gets the same dates as a full one, and with an unreachable remote everything falls back to BUILD_DATE.
One thing to fix: / gets the date of app/page.tsx, which is 2026-07-08 in the build. But the homepage lists every tool from lib/tools.ts, so it changed on Oct 17 and Oct 19 when the color and timestamp converters were added. Can / use the newer of app/page.tsx and lib/tools.ts? git log -1 --format=%cs -- app/page.tsx lib/tools.ts gives that in one call.
And can you drop the fetch-depth: 0 from ci.yml? next.config.js already unshallows a shallow clone, and CI doesn't check the dates, so it only makes every CI run fetch the full history.
anurag629
left a comment
There was a problem hiding this comment.
Thanks @bhushan4work, both are in. On top of current develop (with #201) lint, all 360 tests, the OpenNext build and the pages pass. The built sitemap now gives / 2026-10-19 from lib/tools.ts, and each tool its own folder's date, from 2026-07-08 for the invoice generator to today for the two newest. Merging.
What and why
lastModifiedvalues from build-time metadata instead of sharing one build timestamp.Closes #46
How I tested this
npm run lintnpm run testnpm run buildAI assistance
none
Type of change
Checklist
npm run lint && npm run test && npm run buildpasses locallylib/and have a test inlib/__tests__/page.tsx, client component,opengraph-image.tsx, and the bug report dropdown are all doneNotes for reviewers
Per-URL freshness is resolved at build time; no runtime git access is required. Guides remain out of scope pending #35.