docusaurus/packages/docusaurus-mdx-loader
Sébastien Lorber cfae5d0933
feat(content-docs): sidebar category linking to document or auto-generated index page (#5830)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Armano <armano2@users.noreply.github.com>
Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2021-12-03 14:44:59 +01:00
..
src feat(content-docs): sidebar category linking to document or auto-generated index page (#5830) 2021-12-03 14:44:59 +01:00
README.md docs(v2): Add READMEs to v2 packages (#4034) 2021-01-14 17:16:26 +01:00
package.json feat(content-docs): sidebar category linking to document or auto-generated index page (#5830) 2021-12-03 14:44:59 +01:00
tsconfig.json refactor: improve setup of type declaration files (#5914) 2021-11-12 17:47:27 +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.