diff --git a/layouts/partials/icons/functions/svg-resource.html b/layouts/partials/icons/functions/svg-resource.html index 0ee4350..d8f20a5 100644 --- a/layouts/partials/icons/functions/svg-resource.html +++ b/layouts/partials/icons/functions/svg-resource.html @@ -1,2 +1,7 @@ -{{- $path := printf "icons/%s/%s.svg" .vendor .name }} +{{- $vendor := .vendor }} +{{- $name := string .name }} +{{- with index site.Params.icons.vendors $vendor }} + {{- $vendor = .name }} +{{- end }} +{{- $path := printf "icons/%s/%s.svg" $vendor $name }} {{- return (resources.Get $path) -}} diff --git a/layouts/partials/icons/icon.html b/layouts/partials/icons/icon.html index 3f8679b..e1b198d 100644 --- a/layouts/partials/icons/icon.html +++ b/layouts/partials/icons/icon.html @@ -9,9 +9,6 @@ */}} {{- $vendor := .vendor }} {{- $name := string .name }} -{{- with index site.Params.icons.vendors $vendor }} - {{- $vendor = .name }} -{{- end }} {{- $res := dict "vendor" $vendor "name" $name }} {{- $icon := partialCached "icons/functions/svg-resource" $res $res -}} {{- if not $icon -}}