Skip to content

Commit

Permalink
remove twitter:image meta tag
Browse files Browse the repository at this point in the history
according to https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started,
twitter:image is not needed when og:image appears
  • Loading branch information
reorx committed Sep 9, 2022
1 parent 5a32426 commit d7986e7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}" />
Expand Down

0 comments on commit d7986e7

Please sign in to comment.