hugo-theme/layouts/partials/icon.html

7 lines
238 B
HTML
Raw Normal View History

2024-10-21 13:47:30 +02:00
{{- $iconFile := resources.GetMatch (printf "icons/%s.svg" .) -}}
{{- if $iconFile -}}
{{- $iconFile.Content | safeHTML -}}
{{- else -}}
{{- errorf "Error: icon '%s.svg' is not found under 'assets/icons' folder" . -}}
{{- end -}}