-
-
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
Fix #6618: sitemap urls generated without slash #6658
Fix #6618: sitemap urls generated without slash #6658
Conversation
🦋 Changeset detectedLatest commit: 03039b6 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
One tiny nit, but this looks great! Nice tests.
If we can depend on the node stdlib here, could we just use |
More strict comparison Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
@43081j I thought about it, but I didn't see they using |
Thanks! |
Changes
closes #6618
I added a condition to check whether the base path has a trailing slash or not (when the base path and page path are concatenated) and add the trailing slash if it's missing.
I tested using the
@example/blog
with this configuration:Before:
After:
Testing
I added two new tests for cases were you have a base URL.
trailingSlash: never
trailingSlash: always
Docs
No docs needed, just a bug fix