codehike icon indicating copy to clipboard operation
codehike copied to clipboard

Astro support

Open pomber opened this issue 3 years ago • 12 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.

pomber avatar Aug 01 '22 11:08 pomber

Currently blocked by https://github.com/withastro/astro/issues/4209 and https://github.com/withastro/astro/issues/4389

pomber avatar Aug 09 '22 15:08 pomber

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

carvinlo avatar Nov 21 '22 03:11 carvinlo

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

pomber avatar Nov 21 '22 11:11 pomber

Is this a problem astro needs to solve?

may17 avatar Dec 02 '22 15:12 may17

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.

pomber avatar Dec 02 '22 16:12 pomber

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

pomber avatar Dec 24 '22 18:12 pomber

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.

pomber avatar Jan 10 '23 09:01 pomber

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.

pomber avatar Jul 11 '23 11:07 pomber

Is Astro v2 supported now?

codersjj avatar Aug 20 '23 14:08 codersjj

Is Astro v2 supported now?

It isn't, but there's now an experimental flag in Astro that may help in the future. It's still not working as expected though. Read more here.

pomber avatar Oct 19 '23 15:10 pomber