Skip to content
This repository was archived by the owner on Sep 25, 2023. It is now read-only.
This repository was archived by the owner on Sep 25, 2023. It is now read-only.

Slugs not working? #27

@KjellConnelly

Description

@KjellConnelly

Hi Michel! I watched your video and have implemented a 2 tenant nextjs krabs based express server. I want to keep as much as possible within SSG. I'm having trouble with slugs though. I watched your example pretty carefully on YouTube, but you never showed whether slugs actually do work. I saw you created pages/veggies/blog/[slug].js. And you showed what happens when you click the Post components before you created the slug. But then you never showed what happened once the slug has been created.

Maybe I'm doing it wrong, but I can't figure out how to get the slug to work. I keep getting incompatible 'href' and 'as' values errors:

Uncaught (in promise) Error: The provided `as` value (/blog/post1) is incompatible with the `href` value (/website1/blog/[slug]). Read more: https://nextjs.org/docs/messages/incompatible-href-as

I've tried messing with different href and as values, but I can't figure out the right combination to get this working. Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions