Repository navigation
fix(vite-plugin-nitro): use http namespace URIs in generated sitemap.xml - #2605
Conversation
createXml declared the sitemap and xhtml namespaces with https:// URIs. Namespace names are compared as strings, so https://www.sitemaps.org/... is not the sitemap namespace defined by the protocol, and Search Console reports an incorrect namespace. The https://www.w3.org/1999/xhtml value also put the hreflang xhtml:link alternates in the wrong namespace. Use the http:// URIs from the sitemap protocol and add tests for both namespace declarations. Closes analogjs#2601
✅ Deploy Preview for analog-blog ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for analog-app ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for analog-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe sitemap XML now uses HTTP for the sitemap namespace and, when i18n is configured, the XHTML namespace. New tests check namespace output with and without i18n. Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The sitemap now uses the protocol-specified namespace identifiers. No repository evidence establishes a breaking-change documentation requirement or an affected consumer, so no merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
|
|
View your CI Pipeline Execution ↗ for commit fea9cd3
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
|
Thanks @AyeshaWaseemAhmad! |
PR Checklist
Closes #2601
Affected scope
Recommended merge strategy for maintainer [optional]
What is the new behavior?
createXmldeclares the sitemap namespace ashttp://www.sitemaps.org/schemas/sitemap/0.9and, when i18n is enabled,xmlns:xhtmlashttp://www.w3.org/1999/xhtml. Both were declared withhttps://, which are different namespace names from the ones the sitemap protocol and XHTML define. Search Console reports an incorrect namespace for the sitemap, and thexhtml:linkhreflang alternates were in the wrong namespace.apps/docs-analog/vite/sitemap.tsalready uses thehttp://forms.Two tests in
build-sitemap.spec.tsassert both declarations. They fail with the previous URIs.Test plan
vitest runinpackages/vite-plugin-nitro: 16 files, 118 passed, 11 skipped.prettier --checkon the two changed files, andeslinton them, with no new findings.nx format:check,pnpm buildand the fullpnpm test.Does this PR introduce a breaking change?