delucis / astro-embed

Low-JavaScript embed components for Astro websites
https://astro-embed.netlify.app
MIT License
172 stars 25 forks source link

MDX support for integration-package? #34

Closed fflaten closed 1 year ago

fflaten commented 1 year ago

With Astro Flavored Markdown (AFM) deprecated and removed in Astro v2 in favor of MDX, what's the future for the remark plugin?

Can we support MDX to keep the easy URL-based auto import working? Or provide instructions for how to do it?

delucis commented 1 year ago

Yeah, for v2 we can probably drop support for AFMD here too and only support MDX. Injecting components to MDX is a little more complex. We can use https://github.com/delucis/astro-auto-import for the import injection and borrow from the Astro docs on how to create the component node: https://github.com/withastro/docs/blob/8429df5d014e485d1bc90fcde19621263aa85099/integrations/utils/makeComponentNode.ts#L19-L33

delucis commented 1 year ago

Implemented in #44!