diff --git a/layouts/shortcodes/notice.html b/layouts/shortcodes/notice.html index e4a8c8e..be729aa 100644 --- a/layouts/shortcodes/notice.html +++ b/layouts/shortcodes/notice.html @@ -1,7 +1,11 @@ -{{- $noticeType := .Get 0 -}} {{/* Available notice types: warning, info, note, tip */}} +{{- $noticeType := .Get 0 -}} +{{/* Count how many times we've called this shortcode and load the css if it's the first time */}} +{{- if not ($.Page.Scratch.Get "noticecount") -}} +{{- end -}} +{{- $.Page.Scratch.Add "noticecount" 1 -}}
-

{{ i18n $noticeType }}

+

{{- i18n $noticeType -}}

{{- .Inner -}}