contentlayerdev / contentlayer

Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app
https://www.contentlayer.dev
MIT License
3.29k stars 203 forks source link

API To Access VFile Data #566

Closed m13t closed 9 months ago

m13t commented 12 months ago

Hi,

I have a use case where I'd like to be able to use additional remark and rehype plugins that populate VFile data for things like extracted summaries. Currently I cannot see a way to provide data into the generated documents beyond what is created by the rendered html and properties that exist within the schema. It seems I could do this in a computed field, but it means essentially running another unified pipeline over the passed in documents raw data, which doesn't seem very efficient.

Would it be possible to have an option in makeSource that would allow specifying a list of properties to be included from the VFile data object in the final generated document?

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.