<head>
  {{- $title := ( .Title ) -}}
  {{- $siteTitle := ( .Site.Title ) -}}
  {{- if .IsHome -}}
  <title>{{ $siteTitle }} | {{ i18n "home" }}</title>
  {{- else -}}
  <title>{{ $title }} - {{ $siteTitle }}</title>
  {{- end -}}
  {{ range .AlternativeOutputFormats -}}
  {{ printf `
  <link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
  {{ end -}}

  <meta charset="utf-8" />
  <meta name="description"
    content="{{ if $.IsHome }}{{ i18n $.Site.Params.description }}{{else}}{{$.Description}}{{end}}" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="author" content="Leonardo Murça" />
  <meta property="og:locale" content="{{ .Site.LanguageCode }}">
  <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
  <meta property="og:title"
    content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Title }}{{ end }}">
  <meta property="og:description"
    content="{{ if $.IsHome }}{{ i18n $.Site.Params.description }}{{else}}{{$.Description}}{{end}}" />
  <meta property="og:url" content="{{ .Permalink }}">
  <meta property="og:site_name" content="{{ .Site.Title }}">
  {{ if .Params.featured_image }}
  <meta property="og:image" content="{{ .Params.featured_image }}">
  <meta property="og:image:secure_url" content="{{ .Params.featured_image }}">
  {{- end }}
  {{ if .IsHome }}
  <meta property="og:image" content="{{ .Site.Params.featured_image }}">
  <meta property="og:image:secure_url" content="{{ .Site.Params.featured_image }}">
  {{- end }}
  {{ if isset .Params "date" }}
  <meta property="article:published_time" content="{{ (time .Date).Format " 2006-01-02T15:04:05Z" }}">{{ end }}
  <link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon/favicon-16x16.png">
  <link rel="manifest" href="/site.webmanifest">
  <link rel="stylesheet" type="text/css" href="/css/styles.css" />
  <link rel="preload" as="font">
</head>
