-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Make trailingSlash: 'always'
default
#11922
Conversation
|
I'm not sure that Astro should have an opinion on trailingSlash vs not, this is mostly an aesthetic preference. I'm worried even having such a default might turn some people away from using Astro. From the RFC discussion, it seems the problem this is trying to fix is with |
Ignoring trailing slash has an impact on SEO and reducing potential duplicate work, so I don't think it's only an aesthetic preference. For example, Next and Nuxt have trailingslash as For SSG, we technically already have I don't think the RFC discussion is only about
If you build your file to |
Going to take the discussion over to the RFC thread so that this can focus on code review. |
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.
blocked while the change is being debated
The changes here are outdated |
Changes
There's a lot of work needed to update the test, but creating a stop gap here as something we could discuss before doing more work.
The reason for this change is highlighted in the roadmap link above. For static sites, this should not be a breaking change. For SSR sites, this will be a breaking change for on-demand pages which will now have a trailing slash by default. But you can revert to the previous behaviour for now if you want to not deal with this for now.
Testing
Docs