-
Notifications
You must be signed in to change notification settings - Fork 0
mdx
ChrisAchinga edited this page Sep 8, 2020
·
1 revision
import Button from "src/components/button"
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>test
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>Test
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.