next-cms-ghost
next-cms-ghost copied to clipboard
Upgrade Rehype
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.
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.
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.