mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-05 21:27:24 +02:00
fix: add admonitions support to mdx partials loaded through the fallback mdx loader (#5339)
This commit is contained in:
parent
ee6ebc4877
commit
1f8fa5e859
2 changed files with 3 additions and 0 deletions
|
@ -98,6 +98,7 @@
|
|||
"react-router": "^5.2.0",
|
||||
"react-router-config": "^5.1.1",
|
||||
"react-router-dom": "^5.2.0",
|
||||
"remark-admonitions": "^1.2.1",
|
||||
"resolve-pathname": "^3.0.0",
|
||||
"rtl-detect": "^1.0.3",
|
||||
"semver": "^7.3.4",
|
||||
|
|
|
@ -39,6 +39,7 @@ import {
|
|||
} from './translations/translations';
|
||||
import {mapValues} from 'lodash';
|
||||
import {RuleSetRule} from 'webpack';
|
||||
import admonitions from 'remark-admonitions';
|
||||
|
||||
export type LoadContextOptions = {
|
||||
customOutDir?: string;
|
||||
|
@ -225,6 +226,7 @@ function createMDXFallbackPlugin({siteDir}: {siteDir: string}): LoadedPlugin {
|
|||
staticDir: path.join(siteDir, STATIC_DIR_NAME),
|
||||
isMDXPartial: (_filename) => true, // External mdx files are always meant to be imported as partials
|
||||
isMDXPartialFrontMatterWarningDisabled: true, // External mdx files might have frontmatter, let's just disable the warning
|
||||
remarkPlugins: [admonitions],
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Add table
Reference in a new issue