From 23636ab3260ea41354d7ee560f8848e1c684ec6d Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Mon, 12 Oct 2020 17:26:45 +0530
Subject: [PATCH] templates: social-meta: prefer cover image over other images
---
layouts/partials/templates/opengraph.html | 3 ++-
layouts/partials/templates/schema.html | 3 ++-
layouts/partials/templates/twitter_cards.html | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 48ad5ebf..834e3a12 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -8,7 +8,7 @@
{{- else}}
{{- end}}
-{{- end }}
+{{- else }}
{{ with $.Params.images }}{{ range first 6 . -}}
{{ end }}{{ else -}}
@@ -21,6 +21,7 @@
{{- with $.Site.Params.images -}}
{{ end }}{{ end }}{{ end }}
+{{- end }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
{{- if .IsPage }}
diff --git a/layouts/partials/templates/schema.html b/layouts/partials/templates/schema.html
index e01dc483..6c032b66 100644
--- a/layouts/partials/templates/schema.html
+++ b/layouts/partials/templates/schema.html
@@ -11,7 +11,7 @@
{{- else}}
{{- end}}
-{{- end }}
+{{- else }}
{{ with $.Params.images }}{{ range first 6 . -}}
{{ end }}{{ else -}}
@@ -24,6 +24,7 @@
{{- with $.Site.Params.images -}}
{{ end }}{{ end }}{{ end }}
+{{- end }}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index 2b3b7c96..de86c781 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -5,7 +5,7 @@
{{- else }}
{{- end}}
-{{ end }}
+{{- else }}
{{- with $.Params.images -}}
@@ -25,6 +25,7 @@
{{- end -}}
{{- end -}}
{{- end }}
+{{- end }}
{{ with .Site.Social.twitter -}}