2021-12-30 14:30:40 +00:00
|
|
|
{{- with $.Params.images -}}
|
2021-12-30 14:55:55 +00:00
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
|
|
<meta name="twitter:image" content="{{ index . 0 | absURL }}" />
|
2021-12-30 14:30:40 +00:00
|
|
|
{{ else -}}
|
2021-12-30 14:55:55 +00:00
|
|
|
{{- $images := $.Resources.ByType "image" -}}
|
|
|
|
{{- $featured := $images.GetMatch "*feature*" -}}
|
|
|
|
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
|
|
|
|
{{- with $featured -}}
|
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
|
|
<meta name="twitter:image" content="{{ $featured.Permalink }}" />
|
|
|
|
{{- else -}}
|
|
|
|
{{- with $.Site.Params.images -}}
|
|
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
|
|
<meta name="twitter:image" content="{{ index . 0 | absURL }}" />
|
|
|
|
{{ else -}}
|
|
|
|
<meta name="twitter:card" content="summary" />
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
2021-12-30 14:30:40 +00:00
|
|
|
{{- end }}
|
2022-02-06 11:46:10 +00:00
|
|
|
<meta name="twitter:title" content="{{ partial "utils/title" . }}" />
|
2022-02-05 19:02:17 +00:00
|
|
|
{{- with partial "utils/description" . }}
|
|
|
|
<meta name="twitter:description" content="{{ trim (. | plainify) "\n" }}" />
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Site.Social.twitter -}}
|
2021-12-30 14:55:55 +00:00
|
|
|
<meta name="twitter:site" content="@{{ . }}" />
|
2022-02-05 19:02:17 +00:00
|
|
|
{{- end }}
|