|
When I change the folder [slug] name from: app/posts/[slug]/page.tsx to: app/posts/[...slug]/page.tsx I've created mdx file in posts/myfolder/test.mdx I got some errors: I'm testing from: https://github.com/contentlayerdev/next-contentlayer-example/ Should i edit |
Replies: 1 comment 1 reply
To use "catch all segment", you need to pass slug value in array format in generateStaticParams. In your case, you need to edit your file To find data using slug. More info: https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes#catch-all-segments I hope it make sense. Happy coding 👨🏻💻 |
To use "catch all segment", you need to pass slug value in array format in generateStaticParams.
In your case, you need to edit your file
app/posts/[…