docusaurus/packages/docusaurus-mdx-loader
2020-11-21 18:49:48 +03:00
..
src fix(v2): escape alt text in img tag (#3757) 2020-11-16 15:21:36 +01:00
package.json chore: match fs-events version across the workspace (#3795) 2020-11-21 18:49:48 +03:00
README.md
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 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.