forked from drowl87/hextra_mirror
14 lines
306 B
HTML
14 lines
306 B
HTML
![]() |
{{- $icon := index .context.Site.Data.icons .name -}}
|
||
|
|
||
|
{{- if not $icon -}}
|
||
|
{{ errorf "icon %q not found" .name }}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{- $icon = $icon | safeHTML -}}
|
||
|
|
||
|
{{- if .attributes -}}
|
||
|
{{- $icon = replaceRE "<svg" (printf "<svg %s" .attributes) $icon -}}
|
||
|
{{- end -}}
|
||
|
|
||
|
{{- return ($icon | safeHTML) -}}
|