I'm currently using a remote headless CMS (strapi) with NextJS to provide my markdown content and render it to React components.
The markdown files contain some html elements that are later transformed to some interactive React components. The format is similar to this:
<div id="calculator" />
Which then is transformed to a fully interactive JSX React component.
The problem is that to achieve this the hole article / page needs to be client-side and contributes to a worse performance.
I would like to render each component server-side or client-side individually as it needs, just like astro works.
Is there any way to compile the remote .md or .mdx to the astro format, converting those html elements to astro components?
Thanks beforehand!