diff options
Diffstat (limited to 'themes/default/layouts')
-rw-r--r-- | themes/default/layouts/partials/author-picture.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/author-picture.html b/themes/default/layouts/partials/author-picture.html index 9153e08..01786e7 100644 --- a/themes/default/layouts/partials/author-picture.html +++ b/themes/default/layouts/partials/author-picture.html @@ -20,9 +20,11 @@ {{- $source = print "/" (partial "function-paths.html").media "/" $author.user "/" $author.user "-profile" (path.Ext $author.picture.profile) -}} {{- $sourceset = print "/" (partial "function-paths.html").media "/" $author.user "/" $author.user "-profile.webp" -}} {{- with $metadata := resources.Get $metadata -}} - {{- $metadata = $metadata.Content | transform.Unmarshal -}} - {{- $width = $metadata.picture.profileWidth -}} - {{- $height = $metadata.picture.profileHeight -}} + {{- with $content := $metadata.Content -}} + {{- $metadata = $content | transform.Unmarshal -}} + {{- $width = $metadata.picture.profileWidth -}} + {{- $height = $metadata.picture.profileHeight -}} + {{- end -}} {{- else -}} {{- $source = "/data/media/404.png" -}} {{- $sourceset = "" -}} |