|
| 1 | +<meta charset="UTF-8"> |
| 2 | +<meta http-equiv="X-UA-Compatible" content="ie=edge"> |
| 3 | +{{ if .Params.noindex }} |
| 4 | +<meta name="robots" content="noindex" /> |
| 5 | +{{ end }} |
| 6 | +<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> |
| 7 | +<meta name="author" content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Params.Author }}{{ . }} {{ end }}{{ end }}"> |
| 8 | +<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ if .Params.Description }}{{ .Params.Description }}{{ else }}{{ .Summary | plainify }}{{ end }}{{ end }}" /> |
| 9 | +<meta name="keywords" content="{{ .Site.Params.keywords }}{{ if .Params.tags }}{{ range .Params.tags }}, {{ . }}{{ end }}{{ end }}" /> |
| 10 | +<meta name="robots" content="noodp" /> |
| 11 | +<meta name="theme-color" content="{{ .Site.Params.themeColor }}" /> |
| 12 | +<link rel="canonical" href="{{ .Permalink }}" /> |
| 13 | + |
| 14 | +{{ block "title" . }} |
| 15 | + <title> |
| 16 | + {{ if .IsHome }} |
| 17 | + {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }} |
| 18 | + {{ else }} |
| 19 | + {{ .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }} |
| 20 | + {{ end }} |
| 21 | + </title> |
| 22 | +{{ end }} |
| 23 | + |
| 24 | +<!-- CSS --> |
| 25 | +{{ $opts := dict "transpiler" "libsass" "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true }} |
| 26 | +{{ with resources.Get "scss/main.scss" | toCSS $opts | minify | fingerprint }} |
| 27 | + <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"> |
| 28 | +{{ end }} |
| 29 | + |
| 30 | + |
| 31 | +{{ range $val := $.Site.Params.customCSS }} |
| 32 | + {{ if gt (len $val) 0 }} |
| 33 | + <link rel="stylesheet" type="text/css" href="{{ $val }}"> |
| 34 | + {{ end }} |
| 35 | +{{ end }} |
| 36 | + |
| 37 | +<!-- Icons --> |
| 38 | +{{- partial "favicons.html" . }} |
| 39 | + |
| 40 | +{{ template "_internal/schema.html" . }} |
| 41 | +{{ template "_internal/twitter_cards.html" . }} |
| 42 | + |
| 43 | +{{ if isset .Site.Taxonomies "series" }} |
| 44 | + {{ template "_internal/opengraph.html" . }} |
| 45 | +{{ end }} |
| 46 | + |
| 47 | +{{ range .Params.categories }} |
| 48 | + <meta property="article:section" content="{{ . }}" /> |
| 49 | +{{ end }} |
| 50 | + |
| 51 | +{{ if isset .Params "date" }} |
| 52 | + <meta property="article:published_time" content="{{ time .Date }}" /> |
| 53 | +{{ end }} |
| 54 | + |
| 55 | +<!-- RSS --> |
| 56 | +{{ with .OutputFormats.Get "rss" -}} |
| 57 | + {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} |
| 58 | +{{ end -}} |
| 59 | + |
| 60 | +<!-- JSON Feed --> |
| 61 | +{{ if .OutputFormats.Get "json" }} |
| 62 | +<link href="{{ if .OutputFormats.Get "json" }}{{ .Site.BaseURL }}feed.json{{ end }}" rel="alternate" |
| 63 | + type="application/json" title="{{ .Site.Title }}" /> |
| 64 | +{{ end }} |
| 65 | + |
| 66 | +<!-- Custom head tags --> |
| 67 | +{{- if templates.Exists "partials/extra-head.html" -}} |
| 68 | + {{ partial "extra-head.html" . }} |
| 69 | +{{- end }} |
| 70 | + |
| 71 | +<!-- Google Analytics internal template --> |
| 72 | +{{- if .Site.Config.Services.GoogleAnalytics.ID }} |
| 73 | + {{ template "_internal/google_analytics.html" . }} |
| 74 | +{{- end }} |
| 75 | + |
| 76 | +<!-- Plausible.io --> |
| 77 | +{{- if $.Site.Params.plausibleDataDomain }} |
| 78 | + <script defer data-domain="{{ .Site.Params.plausibleDataDomain }}" src="{{ .Site.Params.plausibleScriptSource }}"></script> |
| 79 | +{{- end}} |
0 commit comments