Skip to content
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: ContentQuery _path not used properly (#1141) #1143

merged 5 commits into from May 25, 2022

fix: ContentQuery _path not used properly (#1141) #1143

merged 5 commits into from May 25, 2022


Copy link

πŸ”— Linked issue


❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Content queries didn't seem to be working quite right when querying folders. If there was a matching exact file then it seemed to work ok but ContentList and ContentQuery that were pointing at folders seemed to be broken.

Looks like the intention was for the path was to match the start allowing a list of all child content pages to be returned.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

netlify bot commented May 25, 2022

βœ… Deploy Preview for nuxt-content ready!

Name Link
πŸ”¨ Latest commit f33454f
πŸ” Latest deploy log
😎 Deploy Preview
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link

Tahul commented May 25, 2022

Hello @GerryWilko πŸ˜„

I added a small comment to your PR, I was already working on the fix!

If we can merge this branch, I can continue my work on tests for these components on mine. πŸ™‚

Waiting for your feedback!

src/runtime/components/ContentQuery.ts Outdated Show resolved Hide resolved
@Tahul Tahul changed the title fix: content query not showing child files #1141 fix: ContentQuery _path not used properly (#1141) May 25, 2022
Copy link
Contributor Author

Hi @Tahul yep that makes sense to me! I thought it was a bit odd that the path sanitizing was in multiple places so pushing into the existing content query makes sense to me.

I was trying to accept your change but it looked like it was going accept it in a strange place unless I misunderstood the preview GitHub was showing me. I haven't used the suggested change feature myself so not very familiar with it πŸ˜„

Thanks for the approve!

@Tahul Tahul changed the title fix: ContentQuery _path not used properly (#1141) fix: ContentQuery _path not used properly (#1141) May 25, 2022
@Tahul Tahul merged commit 1dc7377 into nuxt:main May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants