Brad Wight

MDX!

October 22, 2019

This is a post showing MDX in action. This starter now comes with MDX out-of-the-box!

// you can write JSX in your Markdown!
<button>test</button>

Custom components

You can also import custom React components locally. Make sure gatsby-plugin-root-import as relative paths will not work.

// Import custom component
import Button from "src/components/button"
<Button>Test</Button>

MDX

MDX lets you write JSX embedded inside markdown, perfect for technical blogs. MDX works with Gatsby through gatsby-plugin-mdx. You can learn more about it in the Gatsby docs: Getting Started with MDX.


Senior .NET developer and cloud enthusiast Follow me on Twitter