Improved thumbnail detection for the OpenGraph image tag with articles that have a vector thumbnail and added a PNG version of the Software recommendations article's thumbnail

master
Gianmarco Gargiulo 2023-11-23 16:12:25 +01:00
parent 32842c916c
commit 7ece4c35c3
2 changed files with 1 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

@ -13,7 +13,7 @@
<meta name="og:title" property="og:title" content="{{ .Title }}">
<meta property="og:description" content="{{ .Description }}">
<meta name="twitter:description" property="twitter:description" content="{{ .Description }}">
{{ if .Param "thumbnail" }}<meta name="og:image" content="{{ .Params.thumbnail }}">{{ else }}<meta name="og:image" content="/me.png">{{ end }}
{{ if .Param "thumbnail" }}{{ if strings.Contains .Params.thumbnail ".svg" }}<meta name="og:image" content="{{ replace .Params.thumbnail ".svg" ".png" }}">{{ else }}<meta name="og:image" content="{{ .Params.thumbnail }}">{{ end }}{{ else }}<meta name="og:image" content="/me.png">{{ end }}
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />