docusaurus/packages/docusaurus-mdx-loader
Anshul Goyal 325559933f
feat(v2): add support to import assets using relative link in markdown syntax (#3096)
* add a rehyper plugin

* fix yarn.lok

* add target

* convert to remark

* add docs

* remove unused package

* remove file-loader

* add test for file-loader

* fix test
2020-08-03 15:19:12 +02:00
..
src feat(v2): add support to import assets using relative link in markdown syntax (#3096) 2020-08-03 15:19:12 +02:00
package.json chore(v2): prepare v2.0.0.alpha-61 release (#3182) 2020-08-01 15:24:46 +02:00
README.md chore(v2): add netlify logo for open source plan (#2147) 2019-12-25 16:36:42 +07: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.