Open Bombastickj opened 1 week ago
Needs to support Nuxt I18n path matching with the Nuxt pages features:
-| pages/
---| index.vue
---| users-[group]/
-----| [id].vue
-| pages/
---| index.vue
---| (marketing)/
-----| about.vue
-----| contact.vue
I18n reference: https://i18n.nuxtjs.org/docs/guide/custom-paths#example-3-dynamic-routes
Just a small update on this, I did start investigating and was confirmed in my suspicious that it was going to be quite painful. So will need to try again when I have a good time to sit down with it.
Describe the bug
Hi,
I've been attempting to create a correctly translated sitemap in Nuxt 3 using the
@nuxt/sitemap
module, but I'm facing some difficulties with dynamic routes. Below is the summary of my discussion with @harlan-zw:Issue Summary
differentDomains
(missing home page URL).Reproductions
Initial Setup: Minimal Reproduction Example Expected behavior: Three entries in each translated sitemap.
Missing Homepage / Incorrectly Inferred Dynamic Routes: Minimal Reproduction Example
Multi-Sitemap Configuration: Multi-Sitemap Example Issue: hreflangs remain zero.
Using
defineI18nRoute
: Example withdefineI18nRoute
Issue: Dynamic routes still don't get translated properly.Request
Could you please investigate the support for translating dynamically generated i18n routes in the @nuxt/sitemap module?
Additional Information
For the time being, I'm using
defineI18nRoute
with partial success but still facing issues with dynamic routes. Any suggestions or potential fixes would be highly appreciated.Thank you for your assistance and looking forward to a resolution!
Best regards, Jonas
Reproduction
https://stackblitz.com/edit/nuxt-starter-nc3hjd?file=nuxt.config.ts
System / Nuxt Info
No response