From 1a56e9194539c6ec3daeb70c95b017f4c492e3c9 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Le Duigou Date: Wed, 24 Jun 2020 08:25:13 +0200 Subject: [PATCH] Default to site author If author image is not present in the blog post, it should default to the site author --- layouts/partials/helpers/get-author-image.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/helpers/get-author-image.html b/layouts/partials/helpers/get-author-image.html index 9a324a3..9ab6360 100644 --- a/layouts/partials/helpers/get-author-image.html +++ b/layouts/partials/helpers/get-author-image.html @@ -1,4 +1,7 @@ {{ $authorImage:= "/assets/images/default-avatar.png"}} +{{ if .Site.Data.site.author}} + {{ $authorImage = .Site.Data.site.author.image | relURL }} +{{ end}} {{ if eq (printf "%T" .Params.author ) "maps.Params" }} {{ with .Params.author }} {{ if .image }}