-
-
Notifications
You must be signed in to change notification settings - Fork 213
Open
Labels
Description
What problem does this feature solve?
Doc sites using docusaurus or other frameworks may have custom admonitions throughout 100s of files. Allowing them to migrate their admonitions without having to update copy would bolster migration.
https://docusaurus.io/docs/markdown-features/admonitions#customizing-admonitions
What does the proposed API look like?
Example config
themeConfig: {
admonitions: {
extensions: ['branded-warning'],
uiComponents: [path.join(__dirname, 'components', 'CustomAdmonition.tsx')]
},
},
const CustomAdmonition = ({ level, children }: { level: string }) => {
if(level === "branded-warning") {
return <BrandedWarningAdmonition>{children}</BrandedWarningAdmonition>
}
}
SoonIter