Skip to content

fix(sitemap): derive per-url lastModified from build metadata (#46) - #200

Merged
anurag629 merged 1 commit into
codercops:developfrom
bhushan4work:fix#46
Oct 19, 2026
Merged

anurag629 merged 1 commit into
codercops:developfrom
bhushan4work:fix#46

Conversation

@bhushan4work

Copy link
Copy Markdown
Contributor

What and why

Closes #46

How I tested this

  • npm run lint
  • npm run test
  • npm run build

AI assistance

none

Type of change

  • Bug fix
  • New tool or feature
  • Tests
  • Refactor or cleanup
  • Docs

Checklist

  • I was assigned the linked issue
  • npm run lint && npm run test && npm run build passes locally
  • Logic changes live in lib/ and have a test in lib/__tests__/
  • For a bug fix: the new test fails without my change
  • No analytics, trackers, or calls that send user data off-device
  • Works in both light and dark themes (if UI changed)
  • Inputs have labels and it works with the keyboard alone (if UI changed)
  • New tool: registry entry, page.tsx, client component, opengraph-image.tsx, and the bug report dropdown are all done

Notes for reviewers

Per-URL freshness is resolved at build time; no runtime git access is required. Guides remain out of scope pending #35.

@anurag629 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 anurag629 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@anurag629 anurag629 added the hacktoberfest-accepted PR counts for Hacktoberfest label Oct 19, 2026
@anurag629
anurag629 merged commit fdbb758 into codercops:develop Oct 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted PR counts for Hacktoberfest

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve sitemap with per-URL lastmod and include guides

2 participants