-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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(generator): avoid duplicate slashes for routes ending with hash #7776
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #7776 +/- ##
==========================================
+ Coverage 68.83% 68.85% +0.02%
==========================================
Files 90 90
Lines 3821 3824 +3
Branches 1034 1034
==========================================
+ Hits 2630 2633 +3
Misses 968 968
Partials 223 223
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
You rock @farnabaz 👍
Updating
Also client-side routing is broken. Maybe we should make a warning or force disable trailing slash for static target to avoid this issues? |
This isn't about static target, Using If you look at <NLink v-if="i>0" :to="`./${i-1}`">
Previous
</NLink> |
Agree. Anyway, this is a bug :D Was talking with @Atinux we probably going to remove trailingSlash support for nuxt3 since it is adding more and more edge-cases. |
@pio what will removing trailingSlash support mean for Netlify users? We're currently using that config setting because Netlify rewrites urls with a slash and it messes up SEO/loading performance with superfluous redirects otherwise. (At least, that's my understanding.) |
Yeah, I'm also using the trailing slash because of Netlify: @papertokyo it's possible to disable the redirection: gatsbyjs/gatsby#15317 (comment), but it's not possible to have Netlify automatically redirect routes that end with a trailing slash to their non trailing slash equivalent (but the opposite is possible: non trailing slash --> trailing slash). |
A very annoying limitation from netlify... |
Using links like
/foo/#bar
cause error in generating static pages. This happens because crawler adds a trailing slash to every route. We need to make sure the is no duplicate slashes in route.close #7772
Types of changes
Description
Checklist: