diff options
author | pacollins <thepatrickcollins@gmail.com> | 2020-08-08 07:37:45 +0300 |
---|---|---|
committer | pacollins <thepatrickcollins@gmail.com> | 2020-08-08 07:37:45 +0300 |
commit | fcdfb2dc36ecd6602ae0bbd1d24164aebae32b45 (patch) | |
tree | bcb8522e5536ce113f79130ccf3e59be58925c00 | |
parent | e9d3502ef5692e9fd4d4de739fd9a101bb58de99 (diff) |
Use .Params.images unless .Params.openGraph is set
-rw-r--r-- | layouts/partials/head.html | 8 |
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 }}"> |