{{ if .IsPage }} <!-- Credit V JEANTET --> {{ with .Params.image }} <meta name="twitter:card" content="summary_large_image"/> <meta name="twitter:image" content="{{ . | absURL }}"/> {{ else }} <meta name="twitter:card" content="summary"/> {{ end }} {{ else }} <meta name="twitter:card" content="summary"/> {{ with .Site.Params.cover }}<meta name="twitter:image" content="{{ . | absURL }}"/>{{ end }} {{ end }} <!-- Twitter Card data --> <meta name="twitter:title" content="{{ .Title }}"/> <meta name="twitter:description" content="{{if .IsPage}}{{ .Description | default (substr .Summary 0 160) }}{{ else }}{{ .Site.Params.description }}{{ end }}"/> <meta name="twitter:url" content="{{.URL | absURL}}" /> <meta name="twitter:site" content="@{{ .Site.Params.twitterName }}"/>