@docusaurus/mdx-loader
TypeScript icon, indicating that this package has built-in type declarations

3.6.3 • Public • Published

@docusaurus/mdx-loader

Docusaurus webpack loader for MDX.

Installation

yarn add @docusaurus/mdx-loader

Usage

// ...
module: {
  rules: [
    // ...
    {
      test: /\.mdx?$/,
      use: [
        {
          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.

markdownConfig

The global Docusaurus Markdown config (config.markdown), that plugin authors should forward:

const loader = {
  loader: require.resolve('@docusaurus/mdx-loader'),
  options: {
    markdownConfig: siteConfig.markdown,
  },
};

Readme

Keywords

none

Package Sidebar

Install

npm i @docusaurus/mdx-loader

Weekly Downloads

353,154

Version

3.6.3

License

MIT

Unpacked Size

236 kB

Total Files

126

Last publish

Collaborators

  • fb
  • slorber
  • lex111
  • docusaurus-bot