-
Notifications
You must be signed in to change notification settings - Fork 55
/
header.html
40 lines (40 loc) · 2.31 KB
/
header.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE HTML>
{{ with site.Params.languageCode }}<html lang="{{ . }}">{{ end }}
<head>
<title>{{ if .Title }}{{ .Title }} | {{ end }} {{ site.Params.title }}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
{{ with site.Params.subtitle }}<meta name="description" content="{{ . }}">{{ end }}
{{ with site.Params.Author.name }}<meta name="author" content="{{ . }}">{{ end }}
<meta name="keywords" content="
{{- if .IsHome -}}
{{- if site.Params.keywords -}}
{{- range $i, $e := site.Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end -}}
{{ end -}}
{{ end -}}
{{ if .IsPage }}
{{- if .Params.tags -}}
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }}
{{- end -}}
{{ end -}}" />
{{- with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{- end -}}
{{ hugo.Generator }}
{{- with site.Params.Favicon.sml}}<link rel="shortcut icon" href="{{ . }}" sizes="16x16"/>{{ end -}}
{{- with site.Params.Favicon.med}}<link rel="shortcut icon" href="{{ . }}" sizes="32x32"/>{{ end -}}
{{- with site.Params.Favicon.lge}}<link rel="shortcut icon" href="{{ . }}" sizes="96x96"/>{{ end -}}
{{ with site.Params.Podcast.itunes }}
<meta name="apple-itunes-app" content="app-id={{ replaceRE "https\\:\\/\\/itunes\\.apple\\.com\\/[a-z]{2}\\/podcast\\/[a-z\\-]*\\/id(\\d{10}).*" "$1" . }}" />
{{ end }}
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}
<link rel="stylesheet" href="{{ "fontawesome/css/all.min.css" | absURL }}" />
{{- $css := site.Data.libs.css -}}
{{ if .IsPage }}{{ printf "<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/plyr/%s/plyr.min.css\" integrity=\"%s\" crossorigin=\"anonymous\">" $css.plyr.version $css.plyr.integrity | safeHTML }}{{ end }}
{{ $style := resources.Get "scss/main.scss" | resources.ExecuteAsTemplate "style.main.scss" . | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" media="screen" crossorigin="anonymous" />
{{- range site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | absURL }}">
{{- end -}}
</head>