Skip to content

Conversation

@FinleyGe
Copy link
Collaborator

Summary

  • Remove next-sitemap dependency for better performance and maintainability
  • Implement Next.js 14 native sitemap generation using MetadataRoute.Sitemap
  • Split sitemap into logical sections for SEO best practices:
    • Main sitemap index (/sitemap.xml)
    • Base pages sitemap (/sitemap-base.xml) - 13 URLs, 5.6KB
    • FAQ pages sitemap (/sitemap-faq.xml) - 4200 URLs, 2.2MB
  • Add proper URL encoding for FAQ IDs to handle special characters like &
  • Include comprehensive hreflang annotations for multilingual SEO
  • Implement proper XML generation with caching headers
  • Update package.json to remove postbuild script
  • Add native robots.txt generation

Test Plan

  • Verify sitemap XML format is valid
  • Test all sitemap endpoints return 200 status
  • Confirm FAQ detail pages are accessible
  • Validate multilingual hreflang annotations
  • Check file sizes are within recommended limits (<50MB, <50K URLs)
  • Ensure all FAQ URLs are included (4200 URLs across 3 languages)
  • Test production build and serve

SEO Benefits

  • Better Crawl Efficiency: Split sitemaps allow search engines to process content more efficiently
  • Improved Performance: Smaller file sizes reduce download time
  • Native Support: No third-party dependencies, directly integrated with Next.js 14
  • Enhanced Multilingual Support: Complete hreflang annotations for international SEO
  • Proper Standards Compliance: Follows sitemaps.org protocol and best practices

Generated with Claude Code
via Happy

- Remove next-sitemap dependency for better performance and maintainability
- Implement Next.js 14 native sitemap generation using MetadataRoute.Sitemap
- Split sitemap into logical sections for SEO best practices:
  - Main sitemap index (/sitemap.xml)
  - Base pages sitemap (/sitemap-base.xml) - 13 URLs, 5.6KB
  - FAQ pages sitemap (/sitemap-faq.xml) - 4200 URLs, 2.2MB
- Add proper URL encoding for FAQ IDs to handle special characters like &
- Include comprehensive hreflang annotations for multilingual SEO
- Implement proper XML generation with caching headers
- Update package.json to remove postbuild script
- Add native robots.txt generation

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Happy <[email protected]>
@FinleyGe FinleyGe force-pushed the feat/native-sitemap-optimization branch from cae5f2f to c918ab5 Compare October 21, 2025 08:28
@FinleyGe FinleyGe merged commit 95747da into labring:main Oct 21, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant