Skip to content

Rename slug folder [slug] to [...slug] #450

Description

@netlarico

When I change the folder [slug] name from:

app/posts/[slug]/page.tsx
http://localhost:3000/posts/change-me Works!.

to:

app/posts/[...slug]/page.tsx
http://localhost:3000/posts/myfolder/test Doesn't Work!.

I've created mdx file in posts/myfolder/test.mdx

I got some errors:
Error: A required parameter (slug) was not provided as an array received string in generateStaticParams for /posts/[...slug]

I'm testing from: https://github.com/contentlayerdev/next-contentlayer-example/

Should i edit contentlayer.config.ts or app/posts/[slug]/page.tsx ?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions