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

feat: add filterFn argument to the injectContentFiles function #348

Merged
merged 3 commits into from
Apr 18, 2023

Conversation

gergobergo
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • vite-plugin-angular
  • vite-plugin-nitro
  • astro-angular
  • create-analog
  • router
  • platform
  • content

What is the current behavior?

Currently, we can only query all the content files and we have to filter them after that.

Issue Number: 347

What is the new behavior?

With the new filterFn argument we can filter the values inside the function. Under the hood, it uses the same signature as the Array.filter method, because we use that to filter out the results.

Does this PR introduce a breaking change?

  • Yes
  • No

this feature add a functionality to the injectContentFiles function
to filter out some of the content files before it returns

analogjs#347
@netlify
Copy link

netlify bot commented Apr 16, 2023

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit 6217279
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/643c0d97eaae25000878b0d8
😎 Deploy Preview https://deploy-preview-348--analog-docs.netlify.app
📱 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.

@netlify
Copy link

netlify bot commented Apr 16, 2023

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit 6217279
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/643c0d976685580008f6ad07
😎 Deploy Preview https://deploy-preview-348--analog-app.netlify.app
📱 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.

@netlify
Copy link

netlify bot commented Apr 16, 2023

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit 6217279
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/643c0d97b51bc90008a57135
😎 Deploy Preview https://deploy-preview-348--analog-blog.netlify.app
📱 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.

@gergobergo gergobergo changed the title Feature/347 feat: add filterFn argument to the injectContentFiles function Apr 16, 2023
@brandonroberts brandonroberts merged commit 018b70d into analogjs:main Apr 18, 2023
@brandonroberts
Copy link
Member

Thanks @gergobergo! @allcontributors add @gergobergo for code

@allcontributors
Copy link
Contributor

@brandonroberts

I've put up a pull request to add @gergobergo! 🎉

Villanuevand pushed a commit to Villanuevand/analog that referenced this pull request Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants