Hugo-theme-stack/layouts/partials/helper/icon.html
2020-10-10 00:27:56 +02:00

6 lines
237 B
HTML

{{- $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 -}}