mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #427] [MERGED] fix: sitemap XML namespaces, video entries, and alternate-language links #565
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#565
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/427
Author: @JaredStowell
Created: 3/10/2026
Status: ✅ Merged
Merged: 3/10/2026
Merged by: @james-elicx
Base:
main← Head:jstowell/fix-sitemap-media-and-alternates📝 Commits (1)
3df0de1Update metadata sitemap XML📊 Changes
4 files changed (+407 additions, -49 deletions)
View changed files
📝
packages/vinext/src/server/metadata-routes.ts(+82 -33)📝
tests/app-router.test.ts(+9 -0)📝
tests/fixtures/app-basic/app/sitemap.ts(+15 -0)📝
tests/metadata-routes.test.ts(+301 -16)📄 Description
Fix
sitemapToXml()so it matches Next.js sitemap behavior for media and alternates.This PR:
xmlns:imagewhen image entries are presentxmlns:videowhen video entries are presentxmlns:xhtmlwhen alternates are presentalternates.languagesas<xhtml:link ... />videosas<video:video>blocksresolveSitemap()Why
This fixes three reported sitemap bugs:
Tests
Added and expanded coverage for:
/sitemap.xmloutput from the App Router fixtureValidation
Ran:
pnpm test tests/metadata-routes.test.tspnpm test tests/app-router.test.ts -t "serves /sitemap.xml from dynamic sitemap.ts"pnpm test tests/shims.test.ts -t "sitemapToXml"pnpm run fmtpnpm run typecheckpnpm run lintpnpm run buildpnpm test🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.