<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title itemprop="name">{{ .Title }} | {{ .Site.Title }}</title>
<meta property="og:title" content="{{ .Title }} | {{ .Site.Title }}" />
<meta name="twitter:title" content="{{ .Title }} | {{ .Site.Title }}" />
<meta itemprop="name" content="{{ .Title }} | {{ .Site.Title }}" />
<meta name="application-name" content="{{ .Title }} | {{ .Site.Title }}" />
<meta property="og:site_name" content="{{ .Site.Params.sitename }}" />

{{/*  Define empty variable description  */}}
{{- $description := "" -}}

{{/*  If description is defined in front matter, use it  */}}
{{- if .Params.description -}}
  {{- $description = trim .Params.description "\n" -}}
{{/*  If description is not defined in front matter, use site description  */}}
{{- else if .Site.Params.description -}}
  {{- $description = trim .Site.Params.description "\n" -}}
{{- end -}}

<meta name="description" content="{{ $description }}">
<meta itemprop="description" content="{{ $description }}" />
<meta property="og:description" content="{{ $description }}" />
<meta name="twitter:description" content="{{ $description }}" />

<meta property="og:locale" content="{{ .Site.LanguageCode }}" />
<meta name="language" content="{{ .Site.LanguageCode }}" />
{{ range .AllTranslations }}
  <link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}" />
{{ end }}

{{/*  Define empty variable image  */}}
{{- $image := "" -}}

{{/*  If image is defined in front matter, use it  */}}
{{- if .Params.image -}}
  {{- $image = .Params.image -}}
{{/*  If image is not defined in front matter, use site ogimage  */}}
{{- else if .Site.Params.ogimage -}}
  {{- $image = .Site.Params.ogimage -}}
{{- end -}}

{{- if $image -}}
<meta itemprop="image" content="{{ $image | absURL }}" />
<meta property="og:image" content="{{ $image | absURL }}" />
<meta name="twitter:image" content="{{ $image | absURL }}" />
<meta name="twitter:image:src" content="{{ $image | absURL }}" />
{{- end -}}
