docusaurus/packages/docusaurus-mdx-loader
2021-03-18 18:05:09 +01:00
..
src chore(v2): Fix more linter warnings (#4450) 2021-03-18 18:05:09 +01:00
package.json chore(v2): Fix more linter warnings (#4450) 2021-03-18 18:05:09 +01:00
README.md docs(v2): Add READMEs to v2 packages (#4034) 2021-01-14 17:16:26 +01:00
tsconfig.json chore(v2): Define type for markdown right table of contents (#3306) 2020-08-20 17:57:19 +02:00

@docusaurus/mdx-loader

Docusaurus webpack loader for 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.