Currently within a section we have the [slug] dynamic segment (which is generated at build time with generateStaticParams) to choose a page (such as circuit/hhl, where circuit is the section and hhl is the page).
We are duplicating exactly the same pattern (and code) 4 times (once for each section).
To reduce code, we could use nested dynamic route segments: [section]/[doc], which is entirely populated at build time.
Downsides: slightly increased code complexity, more rigid page functionality.
Looking for opinions on this.
Currently within a section we have the [slug] dynamic segment (which is generated at build time with generateStaticParams) to choose a page (such as
circuit/hhl, wherecircuitis the section andhhlis the page).We are duplicating exactly the same pattern (and code) 4 times (once for each section).
To reduce code, we could use nested dynamic route segments:
[section]/[doc], which is entirely populated at build time.Downsides: slightly increased code complexity, more rigid page functionality.
Looking for opinions on this.