File System Route API causes unicode routes to be 404 #30439
Unanswered
dangkyokhoang
asked this question in
Help
Replies: 1 comment 3 replies
-
You can override the // gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-plugin-page-creator`,
options: {
path: `${__dirname}/src/pages`,
slugify: { /* your options */ },
},
},
],
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Gatsby "slugifies" routes by default (https://www.gatsbyjs.com/docs/reference/routing/file-system-route-api/#routing-and-linking) which produces unexpected and unwanted routes.
Steps to reproduce
Create any route using File System Route API, for example:
{Post.slug}.js
.Expected result
Accessing routes with unicode characters should work.
Actual result
Accessing routes with unicode characters returns 404 because the pages that Gatsby creates have "slugified" routes. This should not be the default behavior. If it must be the default behavior, there should be an option to disable it.
Environment
System:
OS: Windows 10 10.0.18363
Binaries:
Node: 15.11.0 - C:\Program Files\nodejs\node.EXE
npmPackages:
gatsby: 3.1.2 => 3.1.2
gatsby-plugin-google-analytics: ^3.1.0 => 3.1.0
gatsby-plugin-react-helmet: ^4.1.0 => 4.1.0
gatsby-plugin-react-svg: ^3.0.0 => 3.0.0
gatsby-plugin-remove-trailing-slashes: ^3.1.0 => 3.1.0
gatsby-plugin-sass: ^4.1.0 => 4.1.0
Beta Was this translation helpful? Give feedback.
All reactions