bobatheme/layouts/partials/icon.html

6 lines
265 B
HTML

{{ $icon_resource := resources.Get (printf "feather/icons/%s.svg" .) }}
{{ $icon := $icon_resource.Content }}
{{ $icon = replaceRE `<svg` `<svg class="icon"` $icon }}
{{ $icon = replaceRE `</svg>` `<title>{{ . }} icon</title></svg>` $icon }}
{{ $icon | safeHTML }}