diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html
index fc922834a2..8ffc217c03 100644
--- a/layouts/partials/templates/opengraph.html
+++ b/layouts/partials/templates/opengraph.html
@@ -1,33 +1,33 @@
-
-
-
-
+
+
+
+
{{- if .Params.cover.image -}}
{{- if (ne .Params.cover.relative true) }}
-
+
{{- else}}
-
+
{{- end}}
{{- else }}
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- range first 6 $images }}
-
+
{{ end -}}
{{- end }}
{{- if .IsPage }}
{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
-
-{{ with .PublishDate }}{{ end }}
-{{ with .Lastmod }}{{ end }}
+
+{{ with .PublishDate }}{{ end }}
+{{ with .Lastmod }}{{ end }}
{{- end -}}
-{{- with .Params.audio }}{{ end }}
-{{- with .Params.locale }}{{ end }}
-{{- with site.Params.title }}{{ end }}
+{{- with .Params.audio }}{{ end }}
+{{- with .Params.locale }}{{ end }}
+{{- with site.Params.title }}{{ end }}
{{- with .Params.videos }}{{- range . }}
-
+
{{ end }}{{ end }}
{{- /* If it is part of a series, link to related articles */}}
@@ -37,7 +37,7 @@
{{ with .Params.series }}{{- range $name := . }}
{{- $series := index $siteSeries ($name | urlize) }}
{{- range $page := first 6 $series.Pages }}
- {{- if ne $page.Permalink $permalink }}{{ end }}
+ {{- if ne $page.Permalink $permalink }}{{ end }}
{{- end }}
{{ end }}{{ end }}
{{- end }}
@@ -46,7 +46,7 @@
{{- with site.Params.social }}
{{- if reflect.IsMap . }}
{{- with .facebook_admin }}
-
+
{{- end }}
{{- end }}
{{- end }}
diff --git a/layouts/partials/templates/twitter_cards.html b/layouts/partials/templates/twitter_cards.html
index 5d812f6afe..6b0d59bd1d 100644
--- a/layouts/partials/templates/twitter_cards.html
+++ b/layouts/partials/templates/twitter_cards.html
@@ -1,21 +1,21 @@
{{- if .Params.cover.image -}}
-
+
{{- if (ne $.Params.cover.relative true) }}
-
+
{{- else }}
-
+
{{- end}}
{{- else }}
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- with index $images 0 -}}
-
-
+
+
{{- else -}}
-
+
{{- end -}}
{{- end }}
-
-
+
+
{{- $twitterSite := "" }}
{{- with site.Params.social }}
@@ -25,7 +25,7 @@
{{- if not (strings.HasPrefix . "@") }}
{{- $content = printf "@%v" . }}
{{- end }}
-
+
{{- end }}
{{- end }}
{{- end }}