Open gianLuigiL opened 3 months ago
I can't for the life of me get sitemap to generate multiple sitemaps with i18n. And instead it generated a single sitemap for the language with 94k urls.
My config for sitemap:
sitemap: { sitemaps: true, exclude: [ "/admin/**", "/request-new-password", "/reset-password", "/verify-email", ], sources: ["/api/__sitemap__/urls"], // 24 hours cacheMaxAgeSeconds: 3600 * 24, }
My config for i18n:
{ baseUrl: process.env.NUXT_PUBLIC_SITE_URL, locales, strategy: "prefix", defaultLocale: "it", // default locale of your project for Nuxt pages and routings lazy: true, langDir: "i18n/locales/", detectBrowserLanguage: { useCookie: true, cookieKey: "i18n_redirected", redirectOn: "root", // recommended }, vueI18n: "./nuxt-i18n.js", }
The endpoint in server/api returns an array if this type:
server/api
[{ loc: `/pannelli-fotovoltaici-usati/offerte-${deburr(ad.producer)}-${deburr(ad.model)}-${deburr(ad.city)}-${ad.id}`, _i18nTransform: true, images: [{ loc: ad.image }], lastmod: date(ad.updated_at, "YYYY-MM-DD") ?? undefined, }]
Can somebody see what i'm missing?
Details
I can't for the life of me get sitemap to generate multiple sitemaps with i18n. And instead it generated a single sitemap for the language with 94k urls.
My config for sitemap:
My config for i18n:
The endpoint in
server/api
returns an array if this type:Can somebody see what i'm missing?