Replies: 3 comments
-
Mmm there's a couple of ways, but you have to be careful with them. Both use One pitfall here is, what if you want to access the slug data, at some point in time... Then it gets trickier, but not impossible. If you use
Another thing you could do is, rewrite with |
Beta Was this translation helpful? Give feedback.
-
You can statically generate a dynamic route (like [slug]) even if you don’t use the slug for rendering. ``` / app/[slug]/page.tsx
export const dynamic = 'force-static'; // Forces static generation (Next.js 13+)
export default function Page() {
return <div>This page is static. The slug is ignored.</div>;
} If You Need Predefined Slugs (SSG)
|
Beta Was this translation helpful? Give feedback.
-
in my case have
and it solves my problem |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
i have a a route that catch all segment like [slug] but I don't depend on it on render , can I statically generate it ?
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions