skip to content
Logo I like chickens.
they're persistent.
Faust
you better try google.com...

Example 2: Markdown Admonitions

/

This article is translated from the Chinese original.

What are admonitions?

Admonitions (also called “callouts”) are used to provide supporting and supplementary information related to the main content.

How to use them

To use admonitions in Astro Cactus, wrap your Markdown content in a pair of triple colons :::. The opening line should also include the type of admonition you want to use.

For example, using this Markdown:

:::note
Highlights information users should pay attention to, even while skimming.
:::

Output:

Admonition types

The following admonition types are currently supported:

  • note
  • tip
  • important
  • warning
  • caution

Note

:::note
Highlights information users should pay attention to, even while skimming.
:::

Tip

:::tip
Optional information that helps users succeed.
:::

Important

:::important
Key information required for user success.
:::

Warning

:::warning
Critical content that requires immediate attention because of potential risk.
:::

Caution

:::caution
Potential negative consequences of an action.
:::

Custom admonition titles

You can customize the admonition title with the following syntax:

:::note[My custom title]
This is an admonition with a custom title.
:::

Output: