Help Building Site with Static / Dynamic Hybrid Structure
Unanswered
House Finch posted this in #help-forum

House FinchOP
Sorry, this is killing me. I have a custom page in
This has to be a common-ish pattern, is there an easy way to handle this in Next.js?
/pages/mySection/index.js
which I use to render a custom layout. But I want any eventual subpages to use /pages/[slug]/[subSlug]/index.js
. When I build the site I get error > Build error occurred...Error: ENOENT: etc etc
because it is trying to build the parent page twice, once via my custom directory and index file, and again via the index file in [slug] 😅This has to be a common-ish pattern, is there an easy way to handle this in Next.js?