code-hike / codehike

Build rich content websites with Markdown and React
https://codehike.org
MIT License
4.68k stars 142 forks source link

Update next.js example to use `@next/mdx`? #119

Closed AlexFrazer closed 2 years ago

AlexFrazer commented 2 years ago

Looks like it's what the official docs recommend

pomber commented 2 years ago

Last time I checked @next/mdx wasn't using MDX v2. I used the guide from the MDX docs.

AaronLayton commented 2 years ago

I am using mdx-bundler as it gives more flexibility

marckraw commented 2 years ago

@AaronLayton is naming files and CH.Code component works for you in .mdx files if u are using mdx-bundler ? I'm also using it, with nextjs and it doesnt work :(

pomber commented 2 years ago

It should work. Check the examples folder in this repo or provide a sample repo please. Thanks.

marckraw commented 2 years ago

@pomber just did, and fount the issue, it doesnt fully work for react@18, with react@17 everything works great :)

pomber commented 2 years ago

oh, yes, I need to fix #161

pomber commented 2 years ago

The example now uses @next/mdx https://codehike.org/docs/installation/nextjs