From f359fa5d8c38e6b2f28d8c0395c170a2a1c936d7 Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Fri, 27 May 2022 00:06:52 +0200 Subject: Check for featured image --- layouts/partials/templates/opengraph.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'layouts/partials/templates/opengraph.html') diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index c65cdac..5b81f94 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -5,7 +5,11 @@ {{- $logo := resources.Get (site.Params.assets.logo | default "/img/open-graph-logo.png" ) -}} -{{- $image := .Resources.GetMatch .Params.featured_image -}} + +{{- $image := "" -}} +{{- with .Params.featured_image -}} + {{- $image := .Resources.GetMatch .Params.featured_image -}} +{{- end -}} {{- if and .IsPage $image }} -- cgit v1.2.3