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.34k stars 200 forks source link

[Feature Request] Expose rehype tree for computed fields #357

Closed khinshankhan closed 1 year ago

khinshankhan commented 1 year ago

I'd like to be able to use the body's tree applied with remark/ rehype plugins in computed fields.

It's much simpler to apply transformations and then select nodes as opposed to dealing with either the raw or code body. It would make extracting elements like headings or first top level paragraph (for an excerpt) cleaner. It's quite hard to capture the first paragraph based off the raw body unless it's reparsed(?)

stale[bot] commented 1 year 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.

khinshankhan commented 1 year ago

Bump since there's a research label