You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Make the alert type parsing more flexible to support more types
* Add `AlertTitle` and `AlertSign` (for folding)
Note that GitHub will not render callouts with alert title/sign.
See https://help.obsidian.md/Editing+and+formatting/Callouts
Closes #12805
Closes #12801
Copy file name to clipboardExpand all lines: content/en/render-hooks/blockquotes.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,20 @@ Blockquote render hook templates receive the following [context]:
24
24
25
25
(`string`) Applicable when [`Type`](#type) is `alert`, this is the alert type converted to lowercase. See the [alerts](#alerts) section below.
26
26
27
+
###### AlertTitle
28
+
29
+
{{< new-in 0.134.0 >}}
30
+
31
+
(`hstring.HTML`) Applicable when [`Type`](#type) is `alert` when using [Obsidian callouts] syntax, this is the alert title converted to HTML.
32
+
33
+
###### AlertSign
34
+
35
+
{{< new-in 0.134.0 >}}
36
+
37
+
(`string`) Applicable when [`Type`](#type) is `alert` when using [Obsidian callouts] syntax, this is one of "+", "-" or "" (empty string) to indicate the presence of a foldable sign.
(`map`) The [Markdown attributes], available if you configure your site as follows:
@@ -117,13 +131,13 @@ Also known as _callouts_ or _admonitions_, alerts are blockquotes used to emphas
117
131
118
132
119
133
{{% note %}}
120
-
This syntax is compatible with the GitHub Alert Markdown extension.
134
+
This syntax is compatible with both the GitHub Alert Markdown extension and Obsidian's callout syntax.
135
+
But note that GitHub will not recognize callouts with one of Obsidian's extensions (e.g. callout title or the foldable sign).
121
136
{{% /note %}}
122
137
123
-
124
138
The first line of each alert is an alert designator consisting of an exclamation point followed by the alert type, wrapped within brackets.
125
139
126
-
The blockquote render hook below renders a multilingual alert if an alert desginator is present, otherwise it renders a blockquote according to the CommonMark specification.
140
+
The blockquote render hook below renders a multilingual alert if an alert designator is present, otherwise it renders a blockquote according to the CommonMark specification.
0 commit comments