diff --git a/website/docs/guides/markdown-features/markdown-features-admonitions.mdx b/website/docs/guides/markdown-features/markdown-features-admonitions.mdx index e66c0d84ec9e..b017c604612f 100644 --- a/website/docs/guides/markdown-features/markdown-features-admonitions.mdx +++ b/website/docs/guides/markdown-features/markdown-features-admonitions.mdx @@ -121,3 +121,35 @@ import TabItem from '@theme/TabItem'; ``` ::: + +## Custom Admonitions + +If you're using `@docusaurus/preset-classic`, you can create custom admonitions by adding them to your website's `docusaurus.config.js`. + +For example, the following configuration adds an admonition with the `custom` keyword. This admonition will be styled as an [Infima `alert-info` component](https://infima.dev/docs/components/alert): + +```js title="docusaurus.config.js" +module.exports = { + // ... + presets: [ + [ + "@docusaurus/preset-classic", + { + docs: { + // ... + admonitions: { + customTypes: { + custom: { + ifmClass: "info", + svg: '' + }, + }, + }, + }, + } + ] + ] +}; +``` + +Further documentation is available on [Remark's own repository](https://github.com/elviswolcott/remark-admonitions#custom-types).