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
[content collections] Handle file name spaces and capitalization #5666
Conversation
🦋 Changeset detectedLatest commit: 0fe19b5 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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
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.
Looks good to me! Appreciate the tests, awesome work
54f62ca
to
da350e9
Compare
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
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.
code looks good, just need to resolve merge conflicts
da350e9
to
13baa93
Compare
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
Does this PR closes issue with spaces in a parent folder name? eg: The error was:
|
@surjithctly Yes it should! Probably worth an extra unit test for sanity though 👍 |
13baa93
to
0fe19b5
Compare
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.
This PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
Sadly, this doesn't fix the space issue in a parent folder. 👎 I think there should be a unit-test as you said to make sure it doesn't have a regression. |
@surjithctly Well, you're right there 😓 I made the compromise yesterday of merging this fix as-is to ship our minor release, since this PR does solve other existing problems with content collections. Was worth delaying our release for further testing in hindsight. It also looks like an issue outside of content collections after seeing #5598. We can follow-up there as we investigate a fix! |
Changes
new URL
usage with a safersplit('?')
pattern. This prevents spaces from being resolved to%20
.github-slugger
to calculate content slugs. Previously, we simply chopped the extension from the file name. Slugifying each segment should handle capitalization and spaces for use ingetStaticPaths
.english translations/Using Mdx.mdx
->english translations/Using Mdx
english translations/Using Mdx.mdx
->english-translations/using-mdx
github-slugger
2.0. This migrates from CommonJS to ESM but does not introduce API changes (see release notes).Testing
content-collections
fixturegetEntryInfo()
Docs
withastro/docs#2245