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

github.com/pfadfinder-konstanz/hugo-dpsg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormax.mehl <max.mehl@fsfe.org>2021-10-15 16:02:16 +0300
committermax.mehl <max.mehl@fsfe.org>2021-10-15 16:02:16 +0300
commiteffeb322b9f776ae23d2f948b7eea6a6f4446636 (patch)
tree12ab78b66c14b75e33cd219a6e043cab318ebbe5
parent713246a2a43cccccbb1010b7c39a94a1307944dd (diff)
fall-back to thumbnail for opengraph/twitter image
-rw-r--r--layouts/_default/baseof.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 40a49ee..f836e3b 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -8,12 +8,14 @@
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Params.Description }}{{ end }}">
{{- if .Site.Params.opengraph }}
+ {{ if and (not .Params.images) (.Params.thumbnail) }}<meta property="og:image" content="{{ .Params.thumbnail | absURL }}" />{{ end }}
{{ template "_internal/opengraph.html" . }}
{{- end }}
{{- if .Site.Params.schema }}
{{ template "_internal/schema.html" . }}
{{- end }}
{{- if .Site.Params.twitter_cards }}
+ {{ if and (not .Params.images) (.Params.thumbnail) }}<meta property="twitter:image" content="{{ .Params.thumbnail | absURL }}" />{{ end }}
{{ template "_internal/twitter_cards.html" . }}
{{- end }}