From e37d3d3649c4931e552af3999f30dd67a901b2dc Mon Sep 17 00:00:00 2001 From: tdro Date: Sun, 28 Aug 2022 00:20:56 -0400 Subject: themes/default/layouts/partials/author-card: Picture may be copied from remote --- themes/default/layouts/partials/author-card.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html index 953f833..557abdd 100644 --- a/themes/default/layouts/partials/author-card.html +++ b/themes/default/layouts/partials/author-card.html @@ -1,8 +1,13 @@ {{- $profile := .Data.picture.profile -}} +{{- $file := not (urls.Parse $profile).Host -}} + +{{- if $file -}} + {{- $profile = print .Data.user "/" $profile -}} +{{- end -}} {{- $image := partial "function-caches-images.html" (dict - "Source" (print .Data.user "/" $profile) + "Source" $profile "Fit" "160x160" "Target" (print (partial "function-paths.html" "media") "/" .Data.user "/") "Copy" (print (partial "function-paths.html" "media") "/" .Data.user "/" (path.Base $profile)) @@ -43,14 +48,11 @@ -

{{ .Data.name }}

@{{ .Data.user }}

-

{{ .Data.description | markdownify | plainify | htmlUnescape | truncate 60 "..." }}

- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/rss.svg")) }} Follow -- cgit v1.2.3