blog/layouts/partials/icon.html

6 lines
237 B
HTML
Raw Normal View History

2024-11-20 03:20:47 +03: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 -}}