Cannot get Formatted MDX to show for Blog Posts. Getting ERRORs now. #36519
Unanswered
davidkartuzinski
asked this question in
Help
Replies: 2 comments 19 replies
-
Same here, Gatsby Plugin MDX v4 is unusable. Can't make it work at all, it doesn't matter how hard I try. This is quite stupid as there are no examples out there using the v4 of the plugin. |
Beta Was this translation helpful? Give feedback.
18 replies
-
Hey @ovflowd i think this is the right move for you. If you don't want to, or can't fix the issues introduced by upgrading a major version of a package then it's probably best to stick with the older version. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am updating to Gatsby v4 from a theme I coded three years ago.
Following the new tutorial I was able to create new pages using
{mdx.frontmatter__slug.js}
and<MDXProvider>
with almost no issues. [{children}
never worked for me without using<MDXProvider>
..., but it eventually worked great!]rendering worked like this. on my
MAIN
branch.However, using
{mdx.frontmatter__slug.js}
did not allow for me to create PREVIOUS/NEXT blog page navigation like this as I did before here 3 years ago withgatsby-node.js
andcreatePages
.Using
gatsby-node.js
andcreatePages
everything is working as expected EXCEPT thebody
of my MDX blog posts. They are rendered unformatted if I usedata.mdx.body
and{children}
doesn't work with either<MDXRenderer>
or<MDXProvider>
or by itself.Under my
Develop
branch, the unworkable code.I have tried everything, but using
<MDXRenderer>
or<MDXProvider>
- I get the following error message:and
I have searched everywhere.
from the docs Using Page templates, whenever I try to destructure like this referring to
data
, the example,function PostTemplate({ data: { mdx }, children })
. I get errors sayingdata is not defined...
. And the rest of the example using just{children}
does not work for me.function PostTemplate({ data, children })
doesn't work for me.from the tutorial here on Part 6 this never worked for me. I had to use
<MDXProvider>
.Even @LekoArts great blog, prev/next tutorial - does not work for me with formatted markdown.
Please help. I have looked into every theme and there doesn't seem to be any one of them employing Gatsby v4 with
{children}
,{mdx.frontmatter__slug.js}
, and PREV/NEXT.Thank you.
Beta Was this translation helpful? Give feedback.
All reactions