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(content): add path for custom parsers #656

Merged
merged 1 commit into from
Jan 22, 2021
Merged

feat(content): add path for custom parsers #656

merged 1 commit into from
Jan 22, 2021

Conversation

btkostner
Copy link
Contributor

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR adds a second param for custom parsers that is an object (for future extend-ability) with the file path.

Here is my use case:

I'm building a photography portfolio website where I want to drop images in the content folder. I have a custom parser that extracts metadata from the jpg. Sadly I can't get the utf-8 read file content to parse correctly on any of the packages I have found on npm. Most of them just take the file path and handle the reading themselves.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

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.

2 participants