Skip to content

feat(seo): add lastmod to static sitemap listing pages (#1324)#1334

Merged
jonfroehlich merged 1 commit into
masterfrom
1324-sitemap-lastmod
Jun 18, 2026
Merged

feat(seo): add lastmod to static sitemap listing pages (#1324)#1334
jonfroehlich merged 1 commit into
masterfrom
1324-sitemap-lastmod

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

What

Adds <lastmod> to the static listing pages in the sitemap (home, people, publications, projects, awards, news). The per-object sitemaps (projects/people/news) already emitted <lastmod>; the listing pages did not, so crawlers got no re-crawl signal for the listings.

Each listing's lastmod is sourced from its section's most-recent content date:

  • people → latest Person.bio_datetime_modified
  • publications → latest Publication.date
  • projects → latest Project.updated
  • awards → latest Award.date
  • news → latest News.date
  • home → most recent of news / publications / project updates

Empty sections return None, so the framework simply omits <lastmod> for them. Mixed date/datetime across sections is safe — Django's get_latest_lastmod catches the mixed-type max() and drops only the sitemap-index lastmod.

Why

Closes the "sitemap lastmod completeness polish" item from #1324. This is the last concrete on-page-SEO task in that issue; see #1324 for the full wrap-up (the ScholarlyArticle JSON-LD item is being dropped, and the SECURE_PROXY_SSL_HEADER follow-up lives in #1329).

Test

Added test_static_listing_pages_have_lastmod to website/tests/test_sitemap.py. Full sitemap suite passes (8 tests):

docker exec makeabilitylabwebsite-website-1 python manage.py test website.tests.test_sitemap --settings=makeabilitylab.settings_test

No UI changes (XML output only), so no a11y/screenshot impact.

Refs #1324

🤖 Generated with Claude Code

The per-object sitemaps (projects/people/news) already emit <lastmod>, but
the static listing pages (home, people, publications, projects, awards, news)
had none. Source each from its section's most-recent content date so crawlers
get a re-crawl signal for the listings too. Empty sections omit <lastmod>.

Closes the "sitemap lastmod completeness polish" item from #1324.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich reopened this Jun 18, 2026
@jonfroehlich jonfroehlich merged commit 8ecb0b4 into master Jun 18, 2026
4 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.

1 participant