{{- $icons := dict "caution" "warning.svg" "important" "important.svg" "note" "info.svg" "tip" "lightbulb.svg" "warning" "warning.svg" }} {{- $admonitionClasses := dict "caution" "admonition admonition-danger" "important" "admonition admonition-note" "note" "admonition admonition-note" "tip" "admonition admonition-tip" "warning" "admonition admonition-warning" }} {{- $type := cond (index $icons .AlertType) .AlertType "note" }} {{- $iconFile := index $icons $type }} {{- $partial := printf "admonitions/icons/%s" $iconFile }} {{ if eq .Type "alert" }}
{{- partialCached $partial . }} {{ printf "%s%s" (upper (substr $.AlertType 0 1)) (substr $.AlertType 1) }}
{{ .Text | safeHTML }}
{{ else }}
{{ .Text | safeHTML }}
{{ end }}