Skip to content

fix(sitemap): render all published Pages, blog posts, and blog topics - #40

Merged
danielheene merged 1 commit into
developfrom
worktree-sitemap-all-paths
Aug 16, 2026
Merged

fix(sitemap): render all published Pages, blog posts, and blog topics#40
danielheene merged 1 commit into
developfrom
worktree-sitemap-all-paths

Conversation

@danielheene

Copy link
Copy Markdown
Owner

Summary

  • Fixes sitemap.xml to include every publicly crawlable path, not just Pages.
  • Fixes a latent bug in COLLECTION_PREFIX_MAP: BlogPosts generated /posts/<slug> URLs that don't exist — the real route is /blog/post/<slug>. This also fixes broken live-preview links for blog posts.
  • Uncomments the BlogPosts/BlogTopics blocks in app/sitemap.ts.
  • Skips the draft: false query option for BlogTopics, which has no drafts/versions system and can't be filtered that way.
  • Updates test fixtures in generateContentPath, generateContentURL, and generatePreviewPath to match the corrected paths.

Explicitly out of scope

/resume/[slug] (ResumeDocuments) is not added to the sitemap — that collection requires authenticated read access and stores per-job-application generated resume documents, not general public content. Making it public/crawlable would require a separate, deliberate access-control change (confirmed with the repo owner).

Test plan

  • pnpm typecheck — no new errors (14 pre-existing errors unrelated to this change, confirmed present on develop before this branch)
  • pnpm test — 450/450 passing
  • pnpm lint on changed files — no errors (a few style infos matching existing bracket-notation style in the file)
  • Manually verify /sitemap.xml output in a running app (build/dev not run in this session)

🤖 Generated with Claude Code

- Fix COLLECTION_PREFIX_MAP for BlogPosts: 'posts' -> 'blog/post' to match
  the actual live route app/(frontend)/blog/post/[slug]/page.tsx. The old
  prefix produced /posts/<slug> URLs that don't exist, which would have
  broken the sitemap, generateContentURL previews, and live-preview links
  for every blog post.
- Uncomment the BlogPosts and BlogTopics blocks in app/sitemap.ts so /blog,
  /blog/post/<slug>, and /blog/<topic> are included alongside Pages.
- Skip the draft: false query option for BlogTopics in getCollectionData,
  since that collection has no drafts/versions system and querying with
  draft: false is unsupported there (per the existing warning comment in
  src/collections/BlogTopics/index.ts).
- Update generateContentPath/generateContentURL/generatePreviewPath test
  fixtures to expect the corrected /blog/post/... paths.

ResumeDocuments (/resume/[slug]) intentionally stays out of the sitemap:
that collection requires authenticated read access and holds
per-job-application generated resume variants, not general public content.
Making it crawlable would require a separate access-control decision.
poster={item.poster ?? undefined}
preload={priority ? 'auto' : 'metadata'}
ref={videoRef}
src={item.url}
poster={item.poster ?? undefined}
preload={priority ? 'auto' : 'metadata'}
ref={videoRef}
src={item.url}
@danielheene
danielheene marked this pull request as ready for review August 16, 2026 09:13
@danielheene
danielheene merged commit afc2771 into develop Aug 16, 2026
4 of 5 checks passed
@danielheene
danielheene deleted the worktree-sitemap-all-paths branch August 16, 2026 09:13
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