blob: d7cf5f9392019ac9e8d2feab44f9d385583534fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
---
title: "Markdown Admonitions"
description: "This post showcases using the markdown admonition feature in Astro Cactus"
publishDate: "25 Aug 2024"
updatedDate: "7 Jan 2025"
tags: ["markdown", "admonitions"]
---
## What are admonitions
Admonitions (also known as “asides”) are useful for providing supportive and/or supplementary information related to your content.
## How to use them
To use admonitions in Astro Cactus, wrap your Markdown content in a pair of triple colons `:::`. The first pair should also include the type of admonition you want to use.
For example, with the following Markdown:
```md
:::note
Highlights information that users should take into account, even when skimming.
:::
```
Outputs:
:::note
Highlights information that users should take into account, even when skimming.
:::
## Admonition Types
The following admonitions are currently supported:
- `note`
- `tip`
- `important`
- `warning`
- `caution`
### Note
```md
:::note
Highlights information that users should take into account, even when skimming.
:::
```
:::note
Highlights information that users should take into account, even when skimming.
:::
### Tip
```md
:::tip
Optional information to help a user be more successful.
:::
```
:::tip
Optional information to help a user be more successful.
:::
### Important
```md
:::important
Crucial information necessary for users to succeed.
:::
```
:::important
Crucial information necessary for users to succeed.
:::
### Caution
```md
:::caution
Negative potential consequences of an action.
:::
```
:::caution
Negative potential consequences of an action.
:::
### Warning
```md
:::warning
Critical content demanding immediate user attention due to potential risks.
:::
```
:::warning
Critical content demanding immediate user attention due to potential risks.
:::
## Customising the admonition title
You can customise the admonition title using the following markup:
```md
:::note[My custom title]
This is a note with a custom title.
:::
```
Outputs:
:::note[My custom title]
This is a note with a custom title.
:::
|