Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pacollins/hugo-future-imperfect-slim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacollins <thepatrickcollins@gmail.com>2020-08-08 07:37:45 +0300
committerpacollins <thepatrickcollins@gmail.com>2020-08-08 07:37:45 +0300
commitfcdfb2dc36ecd6602ae0bbd1d24164aebae32b45 (patch)
treebcb8522e5536ce113f79130ccf3e59be58925c00
parente9d3502ef5692e9fd4d4de739fd9a101bb58de99 (diff)
Use .Params.images unless .Params.openGraph is set
-rw-r--r--layouts/partials/head.html8
1 files changed, 1 insertions, 7 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index e7af4ce..48c3d03 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -7,13 +7,7 @@
{{ with .Description }}<meta property="og:description" content="{{ . }}">{{ end }}
<meta property="og:url" content="{{ .RelPermalink | absURL }}">
<meta property="og:type" content="{{ cond .IsHome "website" "article" }}">
- {{ with .Params.openGraph }}
- {{ range . }}
- <meta property="og:image" content="{{ .src | absURL }}">
- <meta property="og:image:alt" content="{{ .alt }}">
- {{ end }}
- {{ end }}
- {{ with .Params.images }}
+ {{ with or (.Params.openGraph) (.Params.images) }}
{{ range . }}
<meta property="og:image" content="{{ .src | absURL }}">
<meta property="og:image:alt" content="{{ .alt }}">