From ddfea82cc75c93074194490df3805d28f7852248 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 3 Sep 2022 16:06:39 +0530 Subject: [PATCH] Fix error with profileMode imageUrl on Windows devices when imageUrl was set with external link resources.Get throws an error Ref: https://github.com/gohugoio/hugo/commit/22ef5da20d1685dfe6aff3bd9364c9b1f1d0d8f8 fixes: #1019 --- layouts/partials/index_profile.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html index c2ff3e69..d9ddbda5 100644 --- a/layouts/partials/index_profile.html +++ b/layouts/partials/index_profile.html @@ -2,7 +2,10 @@ {{- with site.Params.profileMode }}
{{- if .imageUrl -}} - {{- $img := resources.Get .imageUrl }} + {{- $img := "" }} + {{- if not (urls.Parse .imageUrl).IsAbs }} + {{- $img = resources.Get .imageUrl }} + {{- end }} {{- if $img }} {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} {{- if hugo.IsExtended -}}