summaryrefslogtreecommitdiffstats
path: root/layouts/partials/templates/opengraph.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/templates/opengraph.html')
-rw-r--r--layouts/partials/templates/opengraph.html6
1 files changed, 5 insertions, 1 deletions
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 @@
<meta property="og:url" content="{{ .Permalink }}">
{{- $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 }}
<meta property="og:image" content="{{ $image.Permalink }}">