docusaurus/packages/docusaurus-mdx-loader
2021-12-21 17:04:39 +01:00
..
src refactor: unify log format with new logger utility (#5994) 2021-12-20 17:24:59 +01:00
.npmignore misc: ignore some files during npm publish (#6092) 2021-12-17 11:38:26 +01:00
package.json v2.0.0-beta.14 2021-12-21 17:04:39 +01:00
README.md docs(v2): Add READMEs to v2 packages (#4034) 2021-01-14 17:16:26 +01:00
tsconfig.json misc: ignore some files during npm publish (#6092) 2021-12-17 11:38:26 +01: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.