You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all I'm still in awe with this library how easy it is to add i18n support and all the features it provides.
I was following through the App Router example and all is working as expected. Now I've added a dynamic route /projects/[slug]. I've updated my config.js file to add this new route to the pathnames object
⨯ Error: Insufficient params provided for localized pathname.
Template: /proyectos/[slug]
I've already checked the docs for the getPathname() function (https://next-intl-docs.vercel.app/docs/routing/navigation#getpathname) and If I pass a single slug it compiles and generates the sitemap.xml correctly but I don't know how to either a) filter out all routes that have a [slug] sub-segment b) if it's correct to do it this way c) there's a way to provide all valid slugs to the params config so I can generate the sitemap.xml.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi
First of all I'm still in awe with this library how easy it is to add i18n support and all the features it provides.
I was following through the App Router example and all is working as expected. Now I've added a dynamic route
/projects/[slug]
. I've updated my config.js file to add this new route to the pathnames objectAnd now I'd like to generate the sitemap.xml to include all projects under /projects route.
But I'm getting this error:
I've already checked the docs for the getPathname() function (https://next-intl-docs.vercel.app/docs/routing/navigation#getpathname) and If I pass a single slug it compiles and generates the sitemap.xml correctly but I don't know how to either a) filter out all routes that have a [slug] sub-segment b) if it's correct to do it this way c) there's a way to provide all valid slugs to the params config so I can generate the sitemap.xml.
Beta Was this translation helpful? Give feedback.
All reactions