diff --git a/layouts/_default/_markup/render-blockquote-alert.html b/layouts/_default/_markup/render-blockquote-alert.html index 91899da6..8e077cf9 100644 --- a/layouts/_default/_markup/render-blockquote-alert.html +++ b/layouts/_default/_markup/render-blockquote-alert.html @@ -1,4 +1,6 @@ -{{- if .AlertTitle -}} +{{- $basicTypes := slice "note" "tip" "important" "warning" "caution" -}} + +{{- if .AlertTitle | or .AlertSign | or (.AlertType | in $basicTypes | not) -}} {{- /* The extended syntax is compatible with Obsidian and FixIt admonition shortcode. */ -}} {{- /* === Dirty hack === */ -}} {{- /* BUG of Hugo https://github.com/gohugoio/hugo/issues/12913 */ -}} diff --git a/layouts/partials/plugin/alert.html b/layouts/partials/plugin/alert.html index 2d78bdba..81a2bc34 100644 --- a/layouts/partials/plugin/alert.html +++ b/layouts/partials/plugin/alert.html @@ -7,11 +7,11 @@ */ -}} {{- $iconMap := dict - "caution" "images/icons/alerts/stop.svg" - "important" "images/icons/alerts/report.svg" "note" "images/icons/alerts/info.svg" "tip" "images/icons/alerts/light-bulb.svg" + "important" "images/icons/alerts/report.svg" "warning" "images/icons/alerts/alert.svg" + "caution" "images/icons/alerts/stop.svg" -}} {{- $attrs := "" }}