Open rabbabansh opened 10 months ago
The TypeError is still an issue for me. Any updates?
Edit: Turns out everyone thinks this is the repo for the next-contentlayer
library, gonna redirect to https://github.com/contentlayerdev/contentlayer 😅
Here's what I did to get this working
You'll first have to downgrade remark-gfm
to 3.x.x
(Read more here: https://github.com/hashicorp/next-mdx-remote/issues/403)
Overwrite the default next
Image
component in order for the parser to properly access it's props
: https://github.com/shadcn/next-contentlayer/blob/5b32397c2034a97a077cd695f3421a2e76af05c5/components/mdx-components.tsx#L4-L6
Needs to be changed into this:
const components = {
Image: (props: any) => <Image alt={props.alt} {...props} />,
};
Read more here: https://github.com/hashicorp/next-mdx-remote/issues/405#issuecomment-1755491272
For reference, I'm running next@14
Related: #17 #16 #17
I can't get remark-gfm to work as a plugin for extending markdown support to include Github Flavoured Markdown.
Adding an
throws a huge error like this: