code-hike / codehike

Marvellous code walkthroughs
https://codehike.org
MIT License
4.39k stars 135 forks source link

codehike makes problem with docusaurus and mermaid #300

Closed blackPeppper closed 1 year ago

blackPeppper commented 1 year ago

codehike makes mermaid not work image image

docusaurus

pomber commented 1 year ago

There's a setting to tell code hike to ignore some languages, that should solve your problem.

There may be other issues, I think @JaKXz has Docusaurus + Code Hike + Mermaid working.

JaKXz commented 1 year ago

Yeah, I found that mdx-v2 and remark-mermaid don't play nice atm, so I published @jakxz/mdx-mermaid to make it work.

@blackPeppper your mileage may vary / proceed at your own risk, etc. :)

blackPeppper commented 1 year ago

@JaKXz should that work with codehike also right ?

JaKXz commented 1 year ago

Yes I am using it with codehike.

blackPeppper commented 1 year ago

after some work i did thanks guys

jgarrow commented 10 months ago

@JaKXz I'm also using Docusaurus with Code Hike, but have been unable to get around the require() of ES Module not supported error when importing mermaid into my docusaurus.config.js (const mermaid = require("@jakxz/mdx-mermaid");). Is there a babel config that I need to add to get this to work?