Hugo-theme-stack/layouts/partials/helper/icon.html

6 lines
237 B
HTML
Raw Permalink Normal View History

2020-10-09 18:27:56 -04: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 -}}