mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
This commit adds support for icon optimization using inline svgs, improving site performance. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
9 lines
248 B
HTML
9 lines
248 B
HTML
{{- $svg := resources.Get (fmt.Printf "icons/%s-fill.svg" .) }}
|
|
{{- if not $svg }}
|
|
{{- errorf "Failed to get icon: %s" . }}
|
|
{{ end }}
|
|
{{- if not $svg.Content }}
|
|
{{- errorf "Failed to get icon: %s" . }}
|
|
{{- end }}
|
|
{{- safe.HTML $svg.Content -}}
|