Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/adityatelange/hugo-PaperMod.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Telange <21258296+adityatelange@users.noreply.github.com>2022-09-03 13:36:39 +0300
committerAditya Telange <21258296+adityatelange@users.noreply.github.com>2022-09-03 13:36:39 +0300
commitddfea82cc75c93074194490df3805d28f7852248 (patch)
treec8830838054ea028e506d6c86e957af766353fc5
parent1f0f294c85a2351099a69f633adf922a7642aaad (diff)
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
-rw-r--r--layouts/partials/index_profile.html5
1 files changed, 4 insertions, 1 deletions
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 }}
<div class="profile_inner">
{{- 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 -}}