mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-02 00:09:48 +02:00
feat: mdx loader fallback, allow importing mdx docs from anywhere (#5299)
* move deep filepath test * split markdownPageExample.md * re-org dogfooding content * Add mdx partials fallback synthetic plugin by default * test commit * hide changelog title as it's already included in the partial file * trigger CI * fix changelog sidebar label
This commit is contained in:
parent
780e924a9e
commit
916b82119b
12 changed files with 354 additions and 276 deletions
|
@ -98,11 +98,16 @@ File at ${filePath} contains FrontMatter that will be ignored: \n${JSON.stringif
|
|||
null,
|
||||
2,
|
||||
)}`;
|
||||
const shouldError = process.env.NODE_ENV === 'test' || process.env.CI;
|
||||
if (shouldError) {
|
||||
return callback(new Error(errorMessage));
|
||||
|
||||
if (options.isMDXPartialFrontMatterWarningDisabled === true) {
|
||||
// no warning
|
||||
} else {
|
||||
console.warn(chalk.yellow(errorMessage));
|
||||
const shouldError = process.env.NODE_ENV === 'test' || process.env.CI;
|
||||
if (shouldError) {
|
||||
return callback(new Error(errorMessage));
|
||||
} else {
|
||||
console.warn(chalk.yellow(errorMessage));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue