styledsea

Remark Admonition

Use Admonition in Adalt

In Docusaurus, there's an Admonition syntax.

For people migrating from Docusaurus, you can enable this remark plugin to support the Admonition syntax.

Usage

import { remarkAdmonition } from 'styledsea-docs-core/mdx-plugins';
 
export default {
  remarkPlugins: [remarkAdmonition],
};

Input

:::warning
Hello World
:::

Output

<Callout type='warn'>
 
Hello World
 
</Callout>

When to use

We highly recommend to use the JSX syntax of MDX instead. It's more flexible, some editors support intellisense in MDX files.

<Callout type='warn'>
 
Hello World
 
</Callout>

Last updated on

On this page

Edit on GitHub