{{- $title := .Title | default .Site.Title -}}
{{- $description := .Description | default .Summary | default .Site.Params.description | default .Site.Title -}}
{{- $image := .Params.image | default .Site.Params.seo.default_image | default "/assets/images/twitter-default.jpg" -}}
{{- $image = $image | absURL -}}
{{- $siteName := .Site.Title -}}
{{- $twitter := .Site.Params.seo.twitter -}}

<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ $title }}">
<meta name="twitter:description" content="{{ $description }}">
<meta name="twitter:image" content="{{ $image }}">
<meta name="twitter:image:alt" content="{{ $title }}">

<!-- Twitter Site -->
{{ with $twitter.site }}
<meta name="twitter:site" content="{{ . }}">
{{ end }}

<!-- Twitter Creator -->
{{ with $twitter.creator }}
<meta name="twitter:creator" content="{{ . }}">
{{ else }}
{{ with .Params.author }}
<meta name="twitter:creator" content="{{ . }}">
{{ end }}
{{ end }}