-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
perfixLink should add any required trailing slashes #855
Comments
What does it create that's invalid? The code is pretty simple, feel free to make a PR to fix up things! https://github.com/gatsbyjs/gatsby/blob/master/lib/isomorphic/gatsby-helpers.js#L33 |
I actually think this should stay the way it is. Outside of webpack-dev-server, postfixing a |
Oh good point. Yeah, trailing slashes aren't required. Technically you could have pages at both the slashless and with-it versions (though that'd be really confusing). Perhaps what prefixLink could do though is tell you when you try linking to a page that doesn't exist. |
Closed as not support v0 anymore |
Hello,
I expect the helper function
prefixLink
to generate valid links, no matter what I throw to it.For example, I expect the following to work
But it does not. I'm forced to do it like this:
Please note the trailinig
/
at the end ofsomesection
Not a big deal, but a bit annoying. I didn't noticed this before because 99% of my links are generated automatically from gatsby metadata.
The text was updated successfully, but these errors were encountered: