Skip to content

Commit ed0bb51

Browse files
authored
add support for the use of GitHub markdown alerts (#8445)
1 parent 790e96d commit ed0bb51

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{ $colors := dict
2+
"caution" "warning"
3+
"important" "danger"
4+
"note" "info"
5+
"tip" "success"
6+
"warning" "warning"
7+
-}}
8+
9+
<div class="alert alert-{{ index $colors .AlertType -}}">
10+
<div class="h4 alert-heading" role="heading">
11+
{{ with .AlertTitle -}}
12+
{{ . -}}
13+
{{ else -}}
14+
{{ or (i18n .AlertType) (title .AlertType) -}}
15+
{{ end }}
16+
</div>
17+
{{ .Text }}
18+
</div>

0 commit comments

Comments
 (0)