magical markdown slides
1# Extensions
2
3## Admonitions/Alerts
4
5Admonitions (also called alerts or callouts) are special highlighted blocks that draw attention to important information. Lantern supports both GitHub-flavored markdown syntax and a custom fence syntax.
6
7### Supported Types
8
9All admonitions are rendered with colored borders and icons:
10
11- **Note/Info** - Blue - General information
12- **Tip/Hint/Important** - Purple - Helpful suggestions
13- **Warning/Caution/Attention** - Yellow - Important warnings
14- **Danger/Error** - Red - Critical issues
15- **Success/Check/Done** - Green - Success messages
16- **Question/Help/FAQ** - Cyan - Questions and help
17- **Example** - Green - Example content
18- **Quote** - Cyan - Quotations
19- **Abstract/Summary/TLDR** - Blue - Summaries
20- **Todo** - Cyan - Todo items
21- **Bug** - Red - Bug reports
22- **Failure/Fail/Missing** - Red - Failures
23
24### GitHub/Obsidian Syntax
25
26```markdown
27> [!NOTE]
28> Useful information that users should know, even when skimming content.
29
30> [!TIP]
31> Helpful advice for doing things better or more easily.
32
33> [!IMPORTANT]
34> Key information users need to know to achieve their goal.
35
36> [!WARNING]
37> Urgent info that needs immediate user attention to avoid problems.
38
39> [!CAUTION]
40> Advises about risks or negative outcomes of certain actions.
41```
42
43### Obsidian
44
45```markdown
46> [!quote]
47> Lorem ipsum dolor sit amet
48
49> [!quote] Optional Title
50> Lorem ipsum dolor sit amet
51
52> [!example]
53> Lorem ipsum dolor sit amet
54
55> [!bug]
56> Lorem ipsum dolor sit amet
57
58> [!danger]
59> Lorem ipsum dolor sit amet
60
61> [!failure]
62> Lorem ipsum dolor sit amet
63
64> [!warning]
65> Lorem ipsum dolor sit amet
66
67> [!question]
68> Lorem ipsum dolor sit amet
69
70> [!success]
71> Lorem ipsum dolor sit amet
72
73> [!tip]
74> Lorem ipsum dolor sit amet
75
76> [!todo]
77> Lorem ipsum dolor sit amet
78
79> [!abstract]
80> Lorem ipsum dolor sit amet
81
82> [!note]
83> Lorem ipsum dolor sit amet
84```
85
86#### Aliases
87
88| Main | Alias |
89| -------- | ------------------ |
90| danger | error |
91| failure | fail, missing |
92| warning | caution, attention |
93| question | help, faq |
94| success | check, done |
95| tip | hint, important |
96| abstract | summary, tldr |
97
98### Fence Syntax
99
100You can also use a custom fence syntax with `:::`:
101
102```markdown
103:::note
104This is a note using fence syntax
105:::
106
107:::warning
108This is a warning with fence syntax
109:::
110
111:::tip
112Pro tip: You can use either syntax!
113:::
114```
115
116### Custom Titles
117
118For GitHub/Obsidian syntax, you can provide a custom title:
119
120```markdown
121> [!WARNING] Custom Warning Title
122> This warning has a custom title instead of the default "Warning"
123```
124
125### Implementation Details
126
127Admonitions are:
128
129- Parsed during markdown preprocessing
130- Converted to internal AST representation
131- Rendered with themed colors from the active color scheme
132- Displayed with Unicode icons (ⓘ, ⚠, ✓, etc.)
133- Support nested markdown content (paragraphs, lists, code, etc.)