Skip to content

Fixes sitemap#9676

Merged
PascalSenn merged 3 commits into
mainfrom
pse/fix-sitemap
May 11, 2026
Merged

Fixes sitemap#9676
PascalSenn merged 3 commits into
mainfrom
pse/fix-sitemap

Conversation

@PascalSenn

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 11, 2026 18:11

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.

Pull request overview

This PR replaces previously committed static sitemap XML files with a generated Next.js sitemap route, aiming to keep sitemap content and lastModified timestamps in sync with the repo (via git metadata) and to better control which URLs appear.

Changes:

  • Remove public/sitemap.xml and public/sitemap-0.xml static artifacts.
  • Add app/sitemap.ts to generate a sitemap at build time, including static routes, basic pages, blog posts/tags, and docs pages (with some docs versions excluded).
  • Extend docs/blog metadata to support sitemap lastModified calculation (lastUpdatedIso for docs; filePath for blog).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
website/public/sitemap.xml Removes previously committed sitemap index file.
website/public/sitemap-0.xml Removes previously committed urlset sitemap file.
website/lib/docs.ts Adds ISO timestamp (lastUpdatedIso) to doc page git metadata for machine-readable dates.
website/lib/blog.ts Adds filePath to blog post objects (used by sitemap generation).
website/app/sitemap.ts New build-time sitemap generator using git commit times and content-derived URLs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread website/lib/blog.ts
Comment thread website/lib/blog.ts
Comment thread website/app/sitemap.ts Outdated
PascalSenn and others added 2 commits May 11, 2026 14:36
- Keep blog source file paths out of the public BlogPost shape so they
  cannot be serialized into client component props
- Build the slug to file path map locally inside the sitemap route
- Replace new Date(post.date) with validity checked parseIso so an
  invalid frontmatter date actually falls back instead of producing an
  Invalid Date
- Skip git mtime lookups in dev so visiting /sitemap.xml does not block
  on per file git execs
@PascalSenn PascalSenn merged commit 59d29fb into main May 11, 2026
18 checks passed
@PascalSenn PascalSenn deleted the pse/fix-sitemap branch May 11, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants