mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 04:37:28 +02:00
* feat(v2): add ability to set custom heading id * Add cli command * Fix slugger * write-heading-ids doc + add in commands/templates * refactor + add tests for writeHeadingIds * polish writeHeadingIds * polish writeHeadingIds * remove i18n goals todo section as the remaining items are quite abstract/useless * fix edge case with 2 md links in heading * extract parseMarkdownHeadingId helper function * refactor using the shared parseMarkdownHeadingId utility fn * change logic of edge case * Handle edge case * Document explicit ids feature Co-authored-by: slorber <lorber.sebastien@gmail.com> |
||
---|---|---|
.. | ||
src | ||
package.json | ||
README.md | ||
tsconfig.json |
@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.