Skip to main content

MDX Components

You can provide custom React components for your MDX files. Just follow the steps below:

  • Create a components.js file in the src/gatsby-theme-dox directory.
  • Export an object with your custom React components.
// src/gatsby-theme-dox/navbar.yaml
import components from 'gatsby-theme-dox/src/components'
export default {
...components // default components
  • You should include the default components from the theme.

Then you can use those components in your MDX files.