Skip to content

Section route segment (dynamic route) to consolidate code #35

Description

@AnthonyW2

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions