We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The slug for post in gatsby-theme-blog are invalid URL when using windows.
gatsby-theme-blog
This is due to the code that use path.join to create slug at https://github.com/gatsbyjs/gatsby/blob/master/themes/gatsby-theme-blog/gatsby-node.js#L171, which is fine in unix but problematic in windows because path.join returns backslash in windows.
path.join
In windows machine, run:
gatsby new my-blog https://github.com/gatsbyjs/gatsby-starter-blog-theme
Then
npm start
Then you should be able to see the links on the home page is incorrect.
The slug for post should be valid URL.
System: OS: Windows 10 CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz Binaries: Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 44.17763.1.0 npmPackages: gatsby: ^2.13.6 => 2.13.6 gatsby-theme-blog: ^1.0.0 => 1.0.0
The text was updated successfully, but these errors were encountered:
I can work on the fix once someone can confirm this is valid bug (not due to my misunderstanding 😅)
Sorry, something went wrong.
Ward is working on a fix 👍🏻 #15370
Should be fixed now with #15370
I just created a fresh gatsby-starter-blog-theme on Windows but am having the same problem. Should I do something to pull in the changes?
No branches or pull requests
Description
The slug for post in
gatsby-theme-blog
are invalid URL when using windows.This is due to the code that use
path.join
to create slug at https://github.com/gatsbyjs/gatsby/blob/master/themes/gatsby-theme-blog/gatsby-node.js#L171, which is fine in unix but problematic in windows becausepath.join
returns backslash in windows.Steps to reproduce
In windows machine, run:
Then
Then you should be able to see the links on the home page is incorrect.
Expected result
The slug for post should be valid URL.
Actual result
Environment
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Binaries:
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.17763.1.0
npmPackages:
gatsby: ^2.13.6 => 2.13.6
gatsby-theme-blog: ^1.0.0 => 1.0.0
The text was updated successfully, but these errors were encountered: