New issue
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
fix(gatsby-theme-blog): drop path.join to support windows #15370
Conversation
Can't we use
|
url.resolve has another use case. Check out https://nodejs.org/api/url.html#url_url_resolve_from_to it only works for 2 values Currenly blocked on getting #15451 shipped |
@wardpeet I tested the The issue is a node const toSlugPath = node => {
const { dir } = path.parse(node.relativePath)
return join.path(basePath, dir, node.name).replace(/\\/g, '/')
} Of course, the |
It seems like joinPath isn't doing what I was told it did. It converts I have a new PR up #15510 that adds urlResolve |
d0fa195
to
40d1d58
Compare
40d1d58
to
da7248f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @wardpeet 🥇
Description
creating urls with path.join isn working on osx & linux but sadly not on windows. This PR fixes that. I join by
/
and replace//
or more into one/
before:
after: