Allow enforcement of trailing slashes on urls and links#393
Merged
jesseleite merged 22 commits intostatamic-v6-supportfrom Jul 18, 2025
Merged
Allow enforcement of trailing slashes on urls and links#393jesseleite merged 22 commits intostatamic-v6-supportfrom
jesseleite merged 22 commits intostatamic-v6-supportfrom
Conversation
…cussed. We think most use cases revolve around use cases like Netlify/etc., so it's probable that the user then wants trailing slashes on all URLs, not just in SEO meta/sitemap. The fact that we were turning it on and off, could end up generating inaccurate stache. We can revisit later if this is needed.
This was referenced Jul 18, 2025
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for enforcing trailing slashes on urls and links in generated SEO meta and in the sitemap. This is useful on server hosts that bias towards trailing slashes (ie. Netlify expects trailing slashes for SEO).
Todo
Add opt-in configURL::enforceTrailingSlashes()in a provider, etc.URL::enforceTrailingSlashes().References #387
References statamic/cms#11840
References statamic/ssg#203