Skip to content

Sitemap: a lastmod date for every generated page - #56

Merged
decompwlj merged 1 commit into
mainfrom
claude/eloquent-ride-d1mga1
Oct 18, 2026
Merged

decompwlj merged 1 commit into
mainfrom
claude/eloquent-ride-d1mga1

Conversation

@decompwlj

Copy link
Copy Markdown
Owner

Summary

Every page written by tools/seo.py (5000 sequence pages, 20 family pages, the list, How it works) now carries <lastmod> in sitemap.xml, so crawlers know which pages changed.

  • Where the dates live: tools/lastmod.json, one entry per page, holding a fingerprint (the first 16 hex digits of the page's SHA-1) and a date.
  • When a date changes: a page whose fingerprint changes is dated today (UTC). An unchanged page keeps its date, so rerunning seo.py on the same pages writes the same sitemap, and the workflow's "static pages in step" check keeps passing.
  • Pages new to the file take the date of the last commit that touched them, or today if they differ from that commit. This seeding needs the git history only once; afterwards the file holds every date, so CI's shallow checkout works.
  • The home page is edited by hand, not written by seo.py, so it carries no date. Otherwise every front-end PR would also have to rerun seo.py.

Seeded today: every generated page last changed on 2026-10-18 (#55).

Tests

  • A second seo.py run writes an identical sitemap.
  • An unchanged page with an older date keeps it; a page whose fingerprint changed is dated today. The real dates were restored after this test.
  • The sitemap is well-formed XML, and check_site.py passes.
  • No other page changed.

After merging: resubmit sitemap.xml once in Search Console.


Generated by Claude Code

Each page written by tools/seo.py (5000 sequence pages, 20 family
pages, the list, How it works) now carries <lastmod> in sitemap.xml,
so crawlers know what changed. The dates live in tools/lastmod.json
with a fingerprint of each page: a changed page is dated today (UTC),
an unchanged one keeps its date, so rerunning seo.py on the same pages
writes the same sitemap (the workflow's "in step" check). A page new to
the file takes the date of the last commit that touched it. The home
page, edited by hand, carries no date.

Seeded today: every generated page last changed on 2026-10-18 (#55).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012pertSPnNVuBXskLxACKDH
@decompwlj
decompwlj merged commit 2c49955 into main Oct 18, 2026
11 checks passed
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