Conversation
:skip :skip
:skip :skip
:skip :skip
:skip :skip
only do ts lints on ts files, delete the obsolete theme package, sx prop is no longer global :skip
:skip :skip
:skip :skip
:skip :skip
…e onclick :skip :skip
:skip :skip
wip, still have to add the contentfilepath to post nodes :skip
codeblocks broken, somehow has a div inside a p now
custom codeblock props are not coming through https://github.com/LekoArts/gatsby-themes/blob/main/themes/gatsby-theme-minimal-blog/src/components/mdx-components.tsx
|
Codeblocks don't get any props apart from a The earliest part I can find where this data should flow that is doesn't is in I copied the logic from @LekoArts https://github.com/LekoArts/gatsby-themes/blob/main/themes/gatsby-theme-minimal-blog/src/components/mdx-components.tsx When logging out This is on a block like this: |
| const MdxComponents = { | ||
| Aside: (props: any) => <Aside {...props} />, | ||
| pre: (preProps: any) => { | ||
| console.log({ preProps }); |
There was a problem hiding this comment.
no codeblock props like hl, numberLines, title reach this part. Why?
|
I was also curious about this at first since it worked before. But this must have changed with MDX 2. Anyways, I looked at their guide https://mdxjs.com/guides/syntax-highlighting/#syntax-highlighting-with-the-meta-field and then adjusted it for my needs. TS version: https://github.com/LekoArts/gatsby-themes/tree/main/packages/rehype-meta-as-attributes Then put the plugin into the rehypePlugins: [rehypeMetaAsAttributes]Afterwards the props will go through again. My code is adjusted from the MDX guide since I want to receive |
new method because old remark-math and rehype-katex are not compatible anymore. probably because mdx v2 requires a newer remark. cannot use new versions of remark-math and rehype-katex because those are esm only and gatsby does not support that
|
Gatsby head notes:
|
style code directly instead since we already intercept pre tags wooorm/xdm#3
mdx2 Removed the ability to use js and json in frontmatter https://www.gatsbyjs.com/plugins/gatsby-plugin-mdx/#graphql-mdx-node-structure
the tableofcontents text field ignores what is inside the codefence gatsbyjs/gatsby#36829
use hacky meaningless from string in the proxy directive datocms/gatsby-source-datocms#188
locally ran yarn policies command and gitignored the resulting yarnrc
Uh oh!
There was an error while loading. Please reload this page.