|
| 1 | +<meta charset="UTF-8"> |
| 2 | +<title>{{ block "title" . }}{{ .Site.Title }}{{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title> |
| 3 | +<base href="{{ .Site.BaseURL }}" target="_self"> |
| 4 | + |
| 5 | +<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | +<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 7 | + |
| 8 | +{{- $title := .Params.Title -}}{{ if not .Params.Title }}{{ $title = .Site.Title }}{{ end }} |
| 9 | +{{- $description := .Params.description -}}{{ if not .Params.description }}{{ $description = .Site.Params.description }}{{ end }} |
| 10 | +{{- $author := .Params.author -}}{{ if not .Params.author }}{{ $author = .Site.Params.author }}{{ end }} |
| 11 | +{{- $keywords := .Params.keywords -}}{{ if not .Params.keywords }}{{ $keywords = .Site.Params.keywords }}{{ end }} |
| 12 | +{{- $image := .Params.Image -}}{{ if not .Params.Image }}{{ $image = .Site.Params.image }}{{ end }} |
| 13 | + |
| 14 | +{{ "<!-- Document Metadata -->" | safeHTML }} |
| 15 | +{{ with $author }}<meta name="author" content="{{ . }}">{{ end }} |
| 16 | +{{ with $description }}<meta name="description" content="{{ . }}">{{ end }} |
| 17 | +{{ with $keywords }}<meta name="keywords" content="{{ . }}">{{ end }} |
| 18 | +<link type="text/plain" rel="author" href="{{ "humans.txt" | absURL }}" /> |
| 19 | + |
| 20 | +{{ "<!-- OpenGraph Metadata -->" | safeHTML }} |
| 21 | +{{ with $title }}<meta property="og:title" content="{{ . }}" />{{ end }} |
| 22 | +{{ with $description }}<meta property="og:description" content="{{ . }}" />{{ end }} |
| 23 | +{{ with $image }}<meta property="og:image" content="{{ . | absURL }}" />{{ end }} |
| 24 | +{{ if $title }}<meta property="og:url" content="{{ .Permalink }}" />{{ end }} |
| 25 | +{{ if $title }}<meta property="og:type" content="website" />{{ end }} |
| 26 | + |
| 27 | +{{ "<!-- Twitter Metadata -->" | safeHTML }} |
| 28 | +{{ with $title }}<meta name="twitter:title" content="{{ . }}" />{{ end }} |
| 29 | +{{ if $title }}<meta name="twitter:card" content="summary">{{ end }} |
| 30 | +{{ with $description }}<meta name="twitter:description" content="{{ . }}" />{{ end }} |
| 31 | +{{ with $image }}<meta name="twitter:image" content="{{ . | absURL }}" />{{ end }} |
| 32 | + |
| 33 | +{{ "<!-- Favicon and Iconography -->" | safeHTML }} |
| 34 | +<link rel="shortcut icon" href="{{ `img/favicon.png` | absURL }}" type="image/x-icon"> |
| 35 | +<link rel="icon" href="{{ `img/favicon.png` | absURL }}" type="image/x-icon"> |
| 36 | + |
| 37 | +{{ "<!-- RSS Feeds -->" | safeHTML }} |
| 38 | +<link rel="alternate" type="application/rss+xml" href="{{.Site.BaseURL }}/index.xml" title="Recent Rotations of the Rotational Labs Blog"> |
| 39 | + |
| 40 | +{{/* TODO: Site Manifest and Apple Icons */}} |
| 41 | + |
| 42 | +{{ "<!-- Fonts -->" | safeHTML }} |
| 43 | + |
| 44 | +{{"<!-- Main Stylesheet -->"|safeHTML}} |
| 45 | + |
| 46 | +{{- if .Site.Params.googleAnalytics -}} |
| 47 | +{{ "<!-- Google Analytics -->" | safeHTML }} |
| 48 | +<script src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Params.googleAnalytics }}" defer></script> |
| 49 | +<script type="module"> |
| 50 | + window.dataLayer = window.dataLayer || []; |
| 51 | + function gtag() { dataLayer.push(arguments); } |
| 52 | + gtag('js', new Date()); |
| 53 | + gtag('config', '{{ .Site.Params.googleAnalytics }}'); |
| 54 | +</script> |
| 55 | +{{ end }} |
0 commit comments