Fix sitemap XML: UTF-8 encoding, correct namespace, and element order by mt0321 · Pull Request #1636 · YAFNET/YAFNET · GitHub
Skip to content

Fix sitemap XML: UTF-8 encoding, correct namespace, and element order#1636

Merged
w8tcha merged 1 commit into
YAFNET:masterfrom
mt0321:fix/sitemap
Apr 6, 2026
Merged

Fix sitemap XML: UTF-8 encoding, correct namespace, and element order#1636
w8tcha merged 1 commit into
YAFNET:masterfrom
mt0321:fix/sitemap

Conversation

@mt0321

@mt0321 mt0321 commented Apr 6, 2026

Copy link
Copy Markdown
Contributor
  • Use XmlWriter with UTF-8 encoding instead of StringWriter (which defaults to UTF-16, rejected by Google)
  • Fix urlset namespace from https to http per sitemaps.org spec
  • Reorder UrlLocation properties to match XSD sequence: loc, lastmod, changefreq, priority
  • Add explicit Order attributes to guarantee serialization order

- Use XmlWriter with UTF-8 encoding instead of StringWriter (which
  defaults to UTF-16, rejected by Google)
- Fix urlset namespace from https to http per sitemaps.org spec
- Reorder UrlLocation properties to match XSD sequence:
  loc, lastmod, changefreq, priority
- Add explicit Order attributes to guarantee serialization order
@w8tcha w8tcha merged commit 4d53e51 into YAFNET:master Apr 6, 2026
@mt0321 mt0321 deleted the fix/sitemap branch April 6, 2026 14:10
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