2020-09-11 21:55:15 +02:00
|
|
|
{{- with .Site.Params.opengraph.twitter.site -}}
|
2021-04-07 17:31:25 +09:00
|
|
|
<meta name="twitter:site" content="@{{ . }}">
|
|
|
|
|
<meta name="twitter:creator" content="@{{ . }}">
|
2020-09-11 21:55:15 +02:00
|
|
|
{{- end -}}
|
|
|
|
|
|
2020-09-17 21:59:57 +02:00
|
|
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
|
|
|
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
2020-09-11 23:00:19 +02:00
|
|
|
|
2024-03-12 14:45:59 +01:00
|
|
|
<meta name="twitter:title" {{ printf "content=%q" $title | safeHTMLAttr }}>
|
|
|
|
|
<meta name="twitter:description" {{ printf "content=%q" $description | safeHTMLAttr }}>
|
2020-09-11 21:55:15 +02:00
|
|
|
|
2026-03-05 17:58:40 +01:00
|
|
|
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources "Context" .) -}}
|
2026-01-25 23:29:41 +01:00
|
|
|
{{- if $image -}}
|
2026-01-26 15:50:18 +01:00
|
|
|
<meta name="twitter:card" content="{{ .Site.Params.opengraph.twitter.card }}">
|
2026-04-26 19:14:34 +08:00
|
|
|
<meta name="twitter:image" content='{{ absURL $image.Permalink }}' />
|
2020-09-11 21:55:15 +02:00
|
|
|
{{- end -}}
|