sitemap and next-intl with app router #62220
Unanswered
spirituelle
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is there a way to acces params varible from sitemap.ts ? i have a multi-location website where each location has it's own articles and also a
Localized pathnames
so i want to have something like thatwww.example.fr/sitemap.xml
www.example.de/sitemap.xml
www.example.en/sitemap.xml
N.B my website already handle all localization aspect and domain configration. also a site mab global.
what i want is something like that in /app/[local]/sitemap.ts
export default async function sitemap({params: {locale} }: {params:{locale: string}): Promise<MetadataRoute.Sitemap> {
return [ {url: host + "/", lastModified: new Date(), } ...
}
Beta Was this translation helpful? Give feedback.
All reactions