code-hike / codehike

Build rich content websites with Markdown and React

Home Page:https://codehike.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Astro support

pomber opened this issue · comments

Astro 1.0 will have better support for MDX. It looks like it adds some custom stuff on top of MDX so I'm not sure Code Hike will still work.

Hi, thanks for this library! When I try to use CH.Section component in astro example it throws an error.

Yes, the Astro integration is still buggy, mostly because of the client directive.

Is this a problem astro needs to solve?

Is this a problem astro needs to solve?

Not sure. I guess other remark-plugins that create client side components will have the same problem, so it would be nice to have some way to default to client:load in some cases.

I may be able to add a workaround in Code Hike but it will have to wait until next month at least.

Found another problem, Astro converts children to static HTML, and Code Hike needs to process them as objects.

We won't have full support for Astro in the near future. I tried, but there were at least 4 different problems blocking the integration.

Main blocker is the inability to pass React children in Astro's MDX. The rest of the issues could be solved from CodeHike's side I think.

commented

Is Astro v2 supported now?