Skip to content

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

@netlarico

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions