From 935e31470d4769ca0e50f8f42a9cc5ca3481562c Mon Sep 17 00:00:00 2001 From: George Cushen Date: Thu, 29 Nov 2018 16:57:46 +0000 Subject: [PATCH] fix: fix(sharing): use small Twitter card for small images This commit fixes 929d500d4456871e0732a22f3861f3ee067b2755 Fix #813 --- layouts/partials/header.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 769a83d2..8398a943 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -127,14 +127,14 @@ {{ if $featured_image }} {{ $og_image = $featured_image.Permalink }} {{ else if .Params.header.image }} - {{ $og_image = .Params.header.image }} + {{ $og_image = printf "img/%s" .Params.header.image | absURL }} {{ else if .Site.Params.sharing_image }} - {{ $og_image = .Site.Params.sharing_image }} + {{ $og_image = printf "img/%s" .Site.Params.sharing_image | absURL }} {{ else if .Site.Params.avatar }} {{ $og_image = (printf "img/%s" $.Site.Params.avatar) | absURL }} {{ $twitter_card = "summary" }} {{ else }} - {{ $og_image = "icon-192.png" }} + {{ $og_image = "img/icon-192.png" | absURL }} {{ $twitter_card = "summary" }} {{ end }} @@ -146,7 +146,7 @@ - {{- with $og_image }}{{end}} + {{- with $og_image }}{{end}} {{ if .IsPage }} {{ if not .PublishDate.IsZero }}