Skip to content

fix(vite-plugin-nitro): use http namespace URIs in generated sitemap.xml - #2605

Merged
brandonroberts merged 1 commit into
analogjs:betafrom
AyeshaWaseemAhmad:fix/sitemap-xml-namespaces
Oct 8, 2026
Merged

brandonroberts merged 1 commit into
analogjs:betafrom
AyeshaWaseemAhmad:fix/sitemap-xml-namespaces

Conversation

@AyeshaWaseemAhmad

Copy link
Copy Markdown
Contributor

PR Checklist

Closes #2601

Affected scope

  • Primary scope: vite-plugin-nitro
  • Secondary scopes: none

Recommended merge strategy for maintainer [optional]

  • Squash merge
  • Rebase merge
  • Other

What is the new behavior?

createXml declares the sitemap namespace as http://www.sitemaps.org/schemas/sitemap/0.9 and, when i18n is enabled, xmlns:xhtml as http://www.w3.org/1999/xhtml. Both were declared with https://, which are different namespace names from the ones the sitemap protocol and XHTML define. Search Console reports an incorrect namespace for the sitemap, and the xhtml:link hreflang alternates were in the wrong namespace. apps/docs-analog/vite/sitemap.ts already uses the http:// forms.

Two tests in build-sitemap.spec.ts assert both declarations. They fail with the previous URIs.

Test plan

  • vitest run in packages/vite-plugin-nitro: 16 files, 118 passed, 11 skipped.
  • prettier --check on the two changed files, and eslint on them, with no new findings.
  • Not run: nx format:check, pnpm build and the full pnpm test.

Does this PR introduce a breaking change?

  • Yes
  • No

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
@netlify

netlify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit fea9cd3
🔍 Latest deploy log https://app.netlify.com/projects/analog-blog/deploys/6ac7bbc05b716200082c0027
😎 Deploy Preview https://deploy-preview-2605--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit fea9cd3
🔍 Latest deploy log https://app.netlify.com/projects/analog-app/deploys/6ac7bbc0c98c7d000904b17b
😎 Deploy Preview https://deploy-preview-2605--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit fea9cd3
🔍 Latest deploy log https://app.netlify.com/projects/analog-docs/deploys/6ac7bbc03bbd670008767d69
😎 Deploy Preview https://deploy-preview-2605--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the scope:vite-plugin-nitro Changes in @analogjs/vite-plugin-nitro label Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: analogjs/analog/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 064155ea-3b48-4f3e-9bfa-b4f386afed24
📥 Commits

Reviewing files that changed from the base of the PR and between eedd920 and fea9cd3.

📒 Files selected for processing (2)
  • packages/vite-plugin-nitro/src/lib/build-sitemap.spec.ts
  • packages/vite-plugin-nitro/src/lib/build-sitemap.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The 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 fea9c

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)
Check name Status Explanation
Title check ✅ Passed The title uses Conventional Commit format with the supported scope vite-plugin-nitro and accurately describes the sitemap namespace URI change.
Description check ✅ Passed The description directly explains the namespace correction, affected scope, tests, validation results, and release impact. It is related to the changeset.
Linked Issues check ✅ Passed Issue #2601 requires exact http:// namespace values in createXml() and tests for both normal and i18n sitemap output. The implementation changes both URIs in build-sitemap.ts. The added tests as…
Out of Scope Changes check ✅ Passed The changes are limited to vite-plugin-nitro sitemap generation and its focused tests. The URI corrections and test coverage directly implement issue #2601. No unrelated behavior or public API chang…
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

@nx-cloud

nx-cloud Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit fea9cd3

Command Status Duration Result
nx run-many --target e2e --projects=analog-app-... ✅ Succeeded 51s View ↗
nx run-many --target test ✅ Succeeded 1m 40s View ↗
nx run-many --target build --all --parallel=1 -... ✅ Succeeded 1m 54s View ↗
nx run-many --target lint --all --exclude=conte... ✅ Succeeded 1m 28s View ↗
nx-cloud record -- pnpm prettier:check ✅ Succeeded 12s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-10-08 15:58:14 UTC

@brandonroberts
brandonroberts merged commit de7bd15 into analogjs:beta Oct 8, 2026
17 of 18 checks passed
@brandonroberts

Copy link
Copy Markdown
Member

Thanks @AyeshaWaseemAhmad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:vite-plugin-nitro Changes in @analogjs/vite-plugin-nitro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sitemap.xml declares https:// namespaces instead of http:// (Search Console "incorrect namespace")

2 participants