- OI Wiki

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.

本页面未记录贡献者
本页面没有标签
本页面最近更新:2020/04/09更新历史
发现错误?想一起完善? 在 GitHub 上编辑此页!
本页面的全部内容在 CC BY-SA 4.0 SATA 协议之条款下提供,附加条款亦可能应用
最近更新: fcbfa0e, 2020-03-27