diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 83593aa..1308fd6 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,6 @@ + {{- partial "precontent.html" . }}
{{- partial "head.html" . -}} {{- partial "head_extended.html" . -}} diff --git a/layouts/partials/precontent.html b/layouts/partials/precontent.html new file mode 100644 index 0000000..9558e5f --- /dev/null +++ b/layouts/partials/precontent.html @@ -0,0 +1,12 @@ +{{- $admonitionIcons := dict + "warning" "exclamation-triangle" + "note" "information-circle" + "tip" "light-bulb" + "caution" "fire" + "important" "key" }} +{{- range $admonition, $icon := $admonitionIcons }} + {{- $res := resources.ExecuteAsTemplate (printf "icons/asciidoctor/%s.svg" $admonition) + (dict "id" $icon "name" $admonition) + (resources.Get "templates/heroicon.svg") }} + {{- $res.Publish }} +{{- end }}