We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c44ba69 commit d095b3bCopy full SHA for d095b3b
layouts/partials/icons/functions/svg-resource.html
@@ -1,2 +1,7 @@
1
-{{- $path := printf "icons/%s/%s.svg" .vendor .name }}
+{{- $vendor := .vendor }}
2
+{{- $name := string .name }}
3
+{{- with index site.Params.icons.vendors $vendor }}
4
+ {{- $vendor = .name }}
5
+{{- end }}
6
+{{- $path := printf "icons/%s/%s.svg" $vendor $name }}
7
{{- return (resources.Get $path) -}}
layouts/partials/icons/icon.html
@@ -9,9 +9,6 @@
9
*/}}
10
{{- $vendor := .vendor }}
11
{{- $name := string .name }}
12
-{{- with index site.Params.icons.vendors $vendor }}
13
- {{- $vendor = .name }}
14
-{{- end }}
15
{{- $res := dict "vendor" $vendor "name" $name }}
16
{{- $icon := partialCached "icons/functions/svg-resource" $res $res -}}
17
{{- if not $icon -}}
0 commit comments