mirror of
https://github.com/docker/docs.git
synced 2026-03-29 15:28:51 +07:00
<!--Delete sections as needed --> ## Description Add initial DHI docs ## Related issues or tickets ENGDOCS- 22650 ## Reviews <!-- Notes for reviewers here --> <!-- List applicable reviews (optionally @tag reviewers) --> - [ ] Technical review - [ ] Editorial review - [ ] Product review --------- Signed-off-by: Craig <craig.osterhout@docker.com>
22 lines
536 B
HTML
22 lines
536 B
HTML
{{- $icon := . -}}
|
|
|
|
{{- $svgPath := "" -}}
|
|
|
|
{{- if or (strings.HasSuffix $icon ".svg") (strings.HasPrefix $icon "icons/") }}
|
|
{{- $svgPath = $icon -}}
|
|
{{- else }}
|
|
{{- $svgPath = printf "icons/%s-fill.svg" $icon -}}
|
|
{{- end }}
|
|
|
|
{{- $svg := resources.Get $svgPath -}}
|
|
|
|
{{- if not $svg }}
|
|
{{- errorf "Failed to get icon: %v (resolved path: %s)\n\n" $icon $svgPath }}
|
|
{{- end }}
|
|
|
|
{{- if not $svg.Content }}
|
|
{{- errorf "Empty content for icon: %v (resolved path: %s)\n\n" $icon $svgPath }}
|
|
{{- end }}
|
|
|
|
{{- $svg.Content | safeHTML -}}
|