Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Astro support #255

Open
pomber opened this issue Aug 1, 2022 · 12 comments · Fixed by #282
Open

Astro support #255

pomber opened this issue Aug 1, 2022 · 12 comments · Fixed by #282

Comments

@pomber
Copy link
Contributor

pomber commented Aug 1, 2022

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
Copy link
Contributor Author

pomber commented Aug 9, 2022

Currently blocked by withastro/astro#4209 and withastro/astro#4389

@pomber pomber reopened this Oct 8, 2022
@carvinlo
Copy link

carvinlo commented Nov 21, 2022

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

@pomber
Copy link
Contributor Author

pomber commented Nov 21, 2022

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

@may17
Copy link

may17 commented Dec 2, 2022

Is this a problem astro needs to solve?

@pomber
Copy link
Contributor Author

pomber commented Dec 2, 2022

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
Copy link
Contributor Author

pomber commented Dec 24, 2022

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

@pomber
Copy link
Contributor Author

pomber commented Jan 10, 2023

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 pomber changed the title Add Astro example Astro support Jan 31, 2023
@pomber
Copy link
Contributor Author

pomber commented Jul 11, 2023

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.

@codersjj
Copy link

Is Astro v2 supported now?

@pomber
Copy link
Contributor Author

pomber commented Oct 19, 2023

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.

@mbleigh
Copy link

mbleigh commented Oct 2, 2024

What's the current state of Astro support with Code Hike? My personal blog is on Astro and I would love to be able to write posts that leverage Code Hike.

@pomber
Copy link
Contributor Author

pomber commented Oct 3, 2024

What's the current state of Astro support with Code Hike?

The TL;DR is: Astro has its own flavor of MDX, Code Hike needs React MDX.

This proposal to allow frameworks to write Astro pages may solve the issue, but doesn't look like it's going to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants