So MDX in Gatsby should be really interesting. It's markdown but you can include React components in it. Supposedly you also have access to frontmatter and data from GraphQL via props but that's not working for me

All of these things are mentioned by the Gatsby docs on MDX.

I can get the import of a component to work

Here's the message component from theme-ui

MDX gives you JSX in Markdown!

Accessing things like frontmatter via props isn't working out

Props remains an empty object for me. Strange


I might come back to this if I need it

Spotted a typo? Edit on Github

Unless otherwise stated I am the creator of all the text, images and code.

Generally I'm happy to share but let's talk first if you want to license or commercialise any of it

© 2023 Laurence Lord