-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
trailingSlash option isn't applied on client-side links when a relative path is specified #35419
Comments
A way to "fix" this is to add leading slashes to the Because that's why it's not working. So instead of Inside gatsby/packages/gatsby-link/src/rewrite-link-path.js Lines 38 to 40 in f63d13d
So after we successfully apple the trailing slash, with Our |
I tried this quickly and changed one of the slugs from Removing any slash from the slug in the frontmatter makes no difference to behaviour described above |
Because the page you created now has two leading slashes: Removing it there and rerunning a build will work. (with |
Thank you, Lennart. You are of course right and it works like a charm and as expected now. |
We still wanna fix the version you previously had though, thanks for surfacing this. |
Preliminary Checks
Description
See : #34205 (comment)
Reproduction Link
https://github.com/wad-im/wadim-on-the-internet
Steps to Reproduce
gatsby develop
Expected Result
The hover and clicked link should both have trailing slashes, as requested in the configuration option
trailingSlash: "always"
Actual Result
The hover and clicked link should both lack trailing slashes, even though trailing slash was requested in the configuration option
trailingSlash: "always"
Environment
Config Flags
trailingSlash: "always"
The text was updated successfully, but these errors were encountered: