docusaurus/packages/docusaurus-mdx-loader
ylemkimon 1bba6b163d
fix(v2): add missing 'react' and 'webpack' peer dependencies (#3675)
* fix(v2): add missing 'react' peer dependencies

* fix(v2): add missing 'webpack' peer dependency
2020-11-02 18:24:19 +01:00
..
src fix(v2): handle multiple asset links in one line properly (#3653) 2020-10-30 16:21:58 +01:00
package.json fix(v2): add missing 'react' and 'webpack' peer dependencies (#3675) 2020-11-02 18:24:19 +01:00
README.md chore(v2): add netlify logo for open source plan (#2147) 2019-12-25 16:36:42 +07: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 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.