<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }} – {{ site.Title }}{{ end }}</title>

  {{ $description := or .Description .Summary site.Params.description }}
  <meta name="description" content="{{ $description | plainify | truncate 160 }}">

  <meta property="og:site_name" content="{{ site.Title }}">
  <meta property="og:title" content="{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}">
  <meta property="og:description" content="{{ $description | plainify | truncate 160 }}">
  <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
  <meta property="og:url" content="{{ .Permalink }}">
  {{ with partial "func/featured-image.html" . }}
    <meta property="og:image" content="{{ .Permalink }}">
  {{ end }}

  {{ with resources.Get "css/main.css" | minify | fingerprint }}
    <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}">
  {{ end }}

  {{ with resources.Get site.Params.logo }}
    {{ $icon := .Resize "180x180 png" }}
    <link rel="icon" href="{{ $icon.RelPermalink }}" type="image/png">
    <link rel="apple-touch-icon" href="{{ $icon.RelPermalink }}">
  {{ end }}

  {{ with .OutputFormats.Get "rss" }}
    <link rel="alternate" type="application/rss+xml" href="{{ .Permalink }}" title="{{ site.Title }}">
  {{ end }}
  <link rel="canonical" href="{{ .Permalink }}">
</head>
