Skip to content

Conversation

@harlan-zw
Copy link
Collaborator

πŸ”— Linked issue

Resolves #486

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Previously, configuring custom sitemaps would disable automatic i18n multi-sitemap generation entirely. Now sitemaps with includeAppSources: true have their exclude/include filters merged into the per-locale sitemaps, while other custom sitemaps are kept separate.

sitemaps: {
  pages: { includeAppSources: true, exclude: ['/admin/**'] },
  posts: { sources: ['/api/__sitemap__/posts'] }
}
// Generates: en-sitemap.xml, fr-sitemap.xml (with filters), posts-sitemap.xml

When custom sitemaps with `includeAppSources: true` are defined,
expand them to per-locale sitemaps with naming `{locale}-{name}`.

- Check if any custom sitemap has `includeAppSources` before disabling i18n
- Expand includeAppSources sitemaps to `{locale}-{name}` format (e.g., en-pages)
- Each expanded sitemap inherits its parent's exclude/include filters
- Keep non-includeAppSources sitemaps as separate sitemaps
- Update URL filtering to match locale-prefixed sitemap names
- Update docs to document the new behavior
@harlan-zw harlan-zw force-pushed the fix/i18n-custom-sitemaps-486 branch from a1c00e2 to d89e2c8 Compare January 29, 2026 15:35
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.

fix: Automatic I18n Multi Sitemap + custom sitemaps not working

2 participants