remove twitter:image meta tag

according to https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started,
twitter:image is not needed when og:image appears
This commit is contained in:
Reorx 2022-09-10 01:44:16 +08:00
parent 5a324267dc
commit d7986e71bf
1 changed files with 2 additions and 4 deletions

View File

@ -84,12 +84,10 @@
{{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started */}}
{{- if .Params.cover.image }}
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" />
<meta name="twitter:card" property="twitter:card" content="summary_large_image" />
<meta name="twitter:card" content="summary_large_image" />
{{- else }}
{{- with site.Params.images -}}
<meta name="twitter:image" content="{{ index . 0 | absURL }}" />
<meta name="twitter:card" property="twitter:card" content="summary" />
<meta name="twitter:card" content="summary" />
{{- end }}
{{- end }}
<meta name="twitter:title" content="{{ $pageTitle }}" />