kentcdodds / mdx-bundler

🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
MIT License
1.78k stars 75 forks source link

How to render the excerpt as a component #190

Closed cayblood closed 1 year ago

cayblood commented 2 years ago

I'm trying to figure out how to take the excerpt from matter and render it as a component. Right now, the markdown in my excerpt is not being parsed. An example in the docs would be appreciated.

hahnbeelee commented 2 years ago

Not sure if this is the most optimal solution, but once you get the excerpt as an output from running bundleMdx maybe you can pass the excerpt into mdx-bundler again, then wrap it around the component you want it to be in.