docusaurus/packages/docusaurus-mdx-loader
2020-03-08 23:45:30 +08:00
..
src chore: yearless copyright headers for source code (#2320) 2020-02-25 23:12:28 +08:00
package.json v2.0.0-alpha.44 2020-03-08 23:45:30 +08:00
README.md chore(v2): add netlify logo for open source plan (#2147) 2019-12-25 16:36:42 +07:00

@docusaurus/mdx-loader

Docusaurus webpack loader of MDX

Installation

yarn add @docusaurus/mdx-loader

Usage

// ...
module: {
  rules: [
    // ...
    {
      test: /\.mdx?$/,
      use: [
        'babel-loader',
        {
          loader: '@docusaurus/mdx-loader',
          options: {
            // .. See options
          },
        },
      ],
    },
  ];
}

Options

rehypePlugins

Array of rehype plugins to manipulate the MDXHAST

remarkPlugins

Array of remark plugins to manipulate the MDXAST

metadataPath

A function to provide the metadataPath depending on current loaded MDX path that will be exported as the MDX metadata.