Some functions for purposes such as generating SVG files.
Become a backer or sponsor to support our work.
icons/functions/svg-resourceThe icons/functions/svg-resource function accepts vendor and name parameters and returns the corresponding SVG icon resource. With it, you can generate SVG file instead of inline <svg> element.
1{{ $ctx := dict "vendor" "bootstrap" "name" "house" }}
2{{ with partialCached "icons/functions/svg-resource" $ctx $ctx }}
3 <img src="{{ .RelPermalink }}" />
4{{ end }}