diff options
author | max.mehl <max.mehl@fsfe.org> | 2021-10-15 16:02:16 +0300 |
---|---|---|
committer | max.mehl <max.mehl@fsfe.org> | 2021-10-15 16:02:16 +0300 |
commit | effeb322b9f776ae23d2f948b7eea6a6f4446636 (patch) | |
tree | 12ab78b66c14b75e33cd219a6e043cab318ebbe5 | |
parent | 713246a2a43cccccbb1010b7c39a94a1307944dd (diff) |
fall-back to thumbnail for opengraph/twitter image
-rw-r--r-- | layouts/_default/baseof.html | 2 |
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 }} |