how to use dynamic route with root route?
Unanswered
Somali posted this in #help-forum
SomaliOP
hi,
what i mean:
i wanna delete root page.js file and create
[slug] (dynamic route) forall pages include 'home' page, but page avalable on '/' path
but i cant rewrite path in generateStaticParams
how to do that?
what i mean:
i wanna delete root page.js file and create
[slug] (dynamic route) forall pages include 'home' page, but page avalable on '/' path
but i cant rewrite path in generateStaticParams
export async function generateStaticParams() {
const posts = await getPages();
return posts.map((post) => ({
slug: post.slug,
}));
}how to do that?