From 4a4d0c009c988e657134253732757b8be4885c7a Mon Sep 17 00:00:00 2001
From: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
Date: Sun, 11 Oct 2020 21:04:17 +0530
Subject: [PATCH] templates: add cover image to be linked into meta
for opengraph, schema and twitter
---
layouts/partials/templates/opengraph.html | 7 +++++++
layouts/partials/templates/schema.html | 7 +++++++
layouts/partials/templates/twitter_cards.html | 8 ++++++++
3 files changed, 22 insertions(+)
diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index 07d9775d..48ad5ebf 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -2,6 +2,13 @@
+{{- if .Params.cover.image -}}
+{{- if (ne .Params.cover.relative true) }}
+
+{{- else}}
+
+{{- end}}
+{{- end }}
{{ with $.Params.images }}{{ range first 6 . -}}
{{ end }}{{ else -}}
diff --git a/layouts/partials/templates/schema.html b/layouts/partials/templates/schema.html
index 0cbae153..e01dc483 100644
--- a/layouts/partials/templates/schema.html
+++ b/layouts/partials/templates/schema.html
@@ -5,6 +5,13 @@
{{ end }}
{{ if not .Lastmod.IsZero }}{{ end }}
+{{- if .Params.cover.image -}}
+{{- if (ne .Params.cover.relative true) }}
+
+{{- else}}
+
+{{- end}}
+{{- end }}
{{ with $.Params.images }}{{ range first 6 . -}}
{{ end }}{{ else -}}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index cbe2430b..2b3b7c96 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -1,3 +1,11 @@
+{{- if .Params.cover.image -}}
+
+{{- if (ne $.Params.cover.relative true) }}
+
+{{- else }}
+
+{{- end}}
+{{ end }}
{{- with $.Params.images -}}