{{ $title := .Site.Title }}
{{ with .Params.title }}
    {{ $title = (printf "%v · %v" $.Params.title $title) }}
{{ end }}
<title>{{ $title }}</title>

{{ with .Site.Params.author.name }}
    <meta name="author" content="{{ . }}">
{{ end }}

{{ with .Site.Params.Summary }}
    <meta name="description" content="{{ . }}"/>
{{ end }}

{{ if .Params.noindex }}
<meta name="robots" content="noindex" />
{{ else if .Params.noarchive }}
<meta name="robots" content="noarchive" />
{{ end }}


<!-- Twitter Card -->
<meta name="twitter:dnt" content="on">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="{{ .Site.Params.twitter }}"/>
<meta name="twitter:title" content="{{ $title }}"/>
<meta name="twitter:creator" content="{{ .Site.Params.twitter }}"/>
<meta name="twitter:description" content="{{ if .Summary }}{{ .Summary }}{{ else }}{{ .Site.Params.Summary }}{{ end }}"/>
<meta property="twitter:url" content="{{ .Permalink }}">

{{ $featured_image := partial "get-featured-image.html" . }}
<!-- must be at least 120x120px -->
{{ with $featured_image }}
<meta name="twitter:image" content="{{ $featured_image }}">
<meta property="og:image" content="{{ $featured_image}}">
{{ end }}

<!-- OG data -->
<meta property="og:title" content="{{ $title }}">
<meta property="og:description" content="{{ if .Summary }}{{ .Summary }}{{ else }}{{ .Site.Params.Summary }}{{ end }}"/>

{{ with .Permalink }}<meta property="og:url" content="{{ . }}">{{ end }}
<meta property="og:locale" content="{{ .Site.LanguageCode }}">
<meta property="og:type" content="{{ if eq .Kind "page" }}article{{ else }}website{{ end }}"/>

<link rel="canonical" href="{{ if .Params.canonicalUrl }}{{ .Params.canonicalUrl }}{{ else if .Permalink }}{{ .Permalink }}{{ end }}">

<!-- <link rel="manifest" href="/my.webmanifest">-->