mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 04:37:28 +02:00
* fix: makes types DocusaurusConfig optional to match docs * add UserDocusaurusConfig with required keys for user config * convert UserDocusaurusConfig to use util type * Docusaurus website config should be type-checked by CI + fix all existing issues * add doc for config typechecking * Update template configs for TS autocompletion * fix last config typechecking bugs * reapply prettier * reapply prettier-docs * Fix TS doc: add missing () * fix some docu plugin types * add "const config" for simpler jsdoc annotation 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.