2020-09-12 03:55:15 +08:00
|
|
|
{{- with .Site.Params.opengraph.twitter.site -}}
|
2021-04-07 16:31:25 +08:00
|
|
|
<meta name="twitter:site" content="@{{ . }}">
|
|
|
|
<meta name="twitter:creator" content="@{{ . }}">
|
2020-09-12 03:55:15 +08:00
|
|
|
{{- end -}}
|
|
|
|
|
2020-09-18 03:59:57 +08:00
|
|
|
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
|
|
|
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
2020-09-12 05:00:19 +08:00
|
|
|
|
|
|
|
<meta name="twitter:title" content="{{ $title }}">
|
|
|
|
<meta name="twitter:description" content="{{ $description }}">
|
2020-09-12 03:55:15 +08:00
|
|
|
|
2020-09-18 06:12:26 +08:00
|
|
|
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
|
2020-09-12 03:55:15 +08:00
|
|
|
{{- if $image.exists -}}
|
2020-12-20 18:05:34 +08:00
|
|
|
<meta name="twitter:card" content="{{ default `summary_large_image` .Site.Params.opengraph.twitter.card }}">
|
|
|
|
<meta name="twitter:image" content='{{ absURL $image.permalink }}' />
|
2020-09-12 03:55:15 +08:00
|
|
|
{{- end -}}
|