Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Handling Next localization with next.config.js #11

Open
IrvingArmenta opened this issue May 28, 2021 · 1 comment
Open

Handling Next localization with next.config.js #11

IrvingArmenta opened this issue May 28, 2021 · 1 comment

Comments

@IrvingArmenta
Copy link

Is there a workaround for handling locales? I get 404 when trying to get to the blog with a locale.

http://localhost:3000/blog/post-slug will return the post correctly but http://localhost:3000/es-MX/blog/post-slug will return 404.

I don't mind if it returns the same content, I just want the post to be rendered as the same if the url has the locale.

@IrvingArmenta
Copy link
Author

I can access the post by building the url myself, using the slug directly as <Link href={/blog/${slug}} /> however, if I access this url with the locale, it would return this error:

NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

So I guess my only option is to use another way to use the md files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant