Remark Admonition
Use Admonition in Fumadocs
In Docusaurus, there's an Admonition syntax.
For people migrating from Docusaurus, you can enable this remark plugin to support the Admonition syntax.
Usage
It requires remark-directive to work.
npm i remark-directiveConfigure both plugins in your config.
import remarkDirective from 'remark-directive';
import { remarkDirectiveAdmonition } from 'fumadocs-core/mdx-plugins';
import { defineConfig } from 'fumadocs-mdx/config';
export default defineConfig({
mdxOptions: {
remarkPlugins: [remarkDirective, remarkDirectiveAdmonition],
},
});Example
:::tip[This is a `title`]
Hello World
:::
:::warning
Hello World
:::When to use
We highly recommend using the JSX syntax of MDX instead. It's more flexible, some editors support IntelliSense in MDX files.
<Callout type='warn'>
Hello World
</Callout>How is this guide?
Last updated on
