mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-14 16:52:39 +02:00
feat: upgrade to MDX v2 (#8288)
Co-authored-by: Armano <armano2@users.noreply.github.com>
This commit is contained in:
parent
10f161d578
commit
bf913aea2a
161 changed files with 4028 additions and 2821 deletions
|
@ -37,17 +37,10 @@ const MarkdownPluginsSchema = Joi.array()
|
|||
export const RemarkPluginsSchema = MarkdownPluginsSchema;
|
||||
export const RehypePluginsSchema = MarkdownPluginsSchema;
|
||||
|
||||
const LegacyAdmonitionConfigSchema = Joi.forbidden().messages({
|
||||
'any.unknown': `The Docusaurus admonitions system has changed, and the option {#label} does not exist anymore.
|
||||
You now need to swizzle the admonitions component to provide UI customizations such as icons.
|
||||
Please refer to https://github.com/facebook/docusaurus/pull/7152 for detailed upgrade instructions.`,
|
||||
});
|
||||
|
||||
export const AdmonitionsSchema = JoiFrontMatter.alternatives()
|
||||
.try(
|
||||
JoiFrontMatter.boolean().required(),
|
||||
JoiFrontMatter.object({
|
||||
tag: JoiFrontMatter.string(),
|
||||
keywords: JoiFrontMatter.array().items(
|
||||
JoiFrontMatter.string(),
|
||||
// Apparently this is how we tell job to accept empty arrays...
|
||||
|
@ -55,10 +48,10 @@ export const AdmonitionsSchema = JoiFrontMatter.alternatives()
|
|||
),
|
||||
extendDefaults: JoiFrontMatter.boolean(),
|
||||
|
||||
// TODO Remove before 2023
|
||||
customTypes: LegacyAdmonitionConfigSchema,
|
||||
icons: LegacyAdmonitionConfigSchema,
|
||||
infima: LegacyAdmonitionConfigSchema,
|
||||
// TODO Remove before 2024
|
||||
tag: Joi.any().forbidden().messages({
|
||||
'any.unknown': `It is not possible anymore to use a custom admonition tag. The only admonition tag supported is ':::' (Markdown Directive syntax)`,
|
||||
}),
|
||||
}).required(),
|
||||
)
|
||||
.default(true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue