styxlab / next-cms-ghost

Publish flaring fast blogs with Next.js and Ghost CMS
https://next.jamify.org
MIT License
674 stars 205 forks source link

Upgrade Rehype #183

Open nring opened 2 years ago

nring commented 2 years ago

I noticed an issue when trying to include an inline link in my Ghost Markdown (this is an [inline link](#inline-link)). Ghost sends down the htmlAst properly formatted but the rendered html is improperly formatted. I believe this is an issue to an old version of rehype/rehype-react. There were some significant type changes in the upgraded major versions of each library and I haven't been able to verify that upgrading will indeed fix the problem. However, the new packages add type support for React 18 elements among other things.

styxlab commented 2 years ago

Yes, I noticed the changes in the rehype/rehype-react packages. Unfortunately, they dropped common js support and moved everything to mjs. While the latter is the future, it did not work seamlessly with Next.js. I will revisit this issue, the next time I update the package dependencies.

nring commented 2 years ago

Sounds good - thank you for taking a look! I actually found the source of the issue I was having, and it's separate from Rehype so I'll open a separate issue for that.