From 3a7561d4a5dc0da2613a1abe953473abb1119342 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 3 Jan 2022 14:56:53 +0000 Subject: [PATCH] Use larger images for metadata --- layouts/partials/metadata.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index 8738e23..f668692 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -2,12 +2,12 @@ {{ .Scratch.Set "image" .Params.image }} {{ if hasPrefix .Params.image "resource:" }} {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }} - {{ .Scratch.Set "image" ($resource.Fill "800x418").Permalink }} + {{ .Scratch.Set "image" ($resource.Resize "800x").Permalink }} {{ else if hasPrefix .Params.image "unsplash:" }} {{ $unsplash_id := replace .Params.image "unsplash:" "" }} {{ $query := querify "client_id" (getenv "UNSPLASH_ACCESS_KEY") }} {{ $unsplash_data := (getJSON "https://api.unsplash.com/photos/" $unsplash_id "?" $query )}} - {{ .Scratch.Set "image" $unsplash_data.urls.small }} + {{ .Scratch.Set "image" $unsplash_data.urls.regular }} {{ end }} {{ end }}