mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 19:27:48 +02:00
* docs(v2): Add READMEs to v2 packages Signed-off-by: Reece Dunham <me@rdil.rocks> * Update packages/docusaurus-remark-plugin-npm2yarn/package.json * Update packages/docusaurus/README.md * Update packages/docusaurus-plugin-sitemap/README.md Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
46 lines
729 B
Markdown
46 lines
729 B
Markdown
# `@docusaurus/mdx-loader`
|
|
|
|
Docusaurus webpack loader for [MDX](https://github.com/mdx-js/mdx).
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
yarn add @docusaurus/mdx-loader
|
|
```
|
|
|
|
## Usage
|
|
|
|
```js
|
|
// ...
|
|
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.
|