Create a precontent partial for miscellaneous tasks

This commit is contained in:
Gabriel Arazas 2023-04-04 19:51:58 +08:00
parent 2a240ba6a3
commit bd2d253228
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 13 additions and 0 deletions

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en" }}">
{{- partial "precontent.html" . }}
<head>
{{- partial "head.html" . -}}
{{- partial "head_extended.html" . -}}

View File

@ -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 }}