docusaurus/packages/docusaurus-mdx-loader
Sébastien Lorber 2a6f116a85
chore: bad remark-admonition readme link (#7939)
2022-08-11 10:38:35 +02:00
..
src chore: bad remark-admonition readme link (#7939) 2022-08-11 10:38:35 +02:00
.npmignore
README.md
package.json
tsconfig.json

README.md

@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.