blob: cac9672596f7ee3d79da96bf8d5362813b34be87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{{- with .Params.image }}
{{ $image := $.Resources.GetMatch . }}
{{ with $image }}
{{ $thumb := .Resize "400x" }}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ $thumb.Permalink }}">
{{ end }}
{{ end }}
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
{{ with .Site.Social.twitter -}}
<meta name="twitter:site" content="@{{ . }}"/>
{{ end -}}
{{ range .Site.Authors }}
{{ with .twitter -}}
<meta name="twitter:creator" content="@{{ . }}"/>
{{ end -}}
{{ end -}}
|