2020-04-08 21:44:29 +03:00
< head >
< meta charset = "utf-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
{{- $title := ( .Title ) -}}
{{- $siteTitle := ( .Site.Title ) -}}
{{- if .IsHome -}}
2020-06-24 10:57:58 +03:00
< title > {{ $siteTitle }} | Home < / title >
2020-04-08 21:44:29 +03:00
{{- else -}}
< title > {{ $title }} - {{ $siteTitle }}< / title >
{{- end -}}
{{- if isset .Site.Params "favicon" -}}
< link rel = "icon" type = "image/png" href = {{ . Site . Params . favicon } } / >
{{- end -}}
< meta name = "viewport" content = "width=device-width, initial-scale=1" >
2021-05-22 18:54:55 +03:00
< meta name = "description" content = "{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" / >
2020-06-24 10:57:58 +03:00
< meta property = "og:image" content = "{{ .Site.Params.og_image }}" / >
2020-04-08 21:44:29 +03:00
{{ with .OutputFormats.Get "rss" -}}
{{ printf `< link rel = "%s" type = "%s" href = "%s" title = "%s" / > ` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
2021-06-08 22:57:36 +03:00
2020-04-08 21:44:29 +03:00
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
2020-10-20 21:03:23 +03:00
{{ if and (isset .Site.Params "social") (.Site.Params.useCDN | default false) -}}
2020-04-10 22:41:05 +03:00
< script src = "https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js" > < / script >
{{- else if (isset .Site.Params "social") -}}
< script src = "{{ .Site.BaseURL }}js/feather.min.js" > < / script >
{{ end }}
2020-10-20 21:03:23 +03:00
{{ if .Site.Params.useCDN | default false -}}
< link href = "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@1,500&display=swap" rel = "stylesheet" >
< link href = "https://fonts.googleapis.com/css2?family=Fira+Sans&display=swap" rel = "stylesheet" >
< link href = "https://fonts.googleapis.com/css?family=Roboto+Mono" rel = "stylesheet" >
{{- else -}}
2021-06-05 00:34:27 +03:00
{{ $fontstyle := resources.Get "css/fonts.css" | fingerprint }}
< link href = "{{ $fontstyle.Permalink }}" rel = "stylesheet" >
2020-10-20 21:03:23 +03:00
{{ end }}
2021-06-08 22:57:36 +03:00
2021-06-05 00:34:27 +03:00
{{ $style := resources.Get "css/main.css" | fingerprint }}
< link rel = "stylesheet" type = "text/css" media = "screen" href = "{{ $style.Permalink }}" / >
2021-06-08 22:57:36 +03:00
2020-04-16 10:20:38 +03:00
{{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}}
2021-06-05 00:34:27 +03:00
{{ $darkstyle := resources.Get "css/dark.css" | fingerprint }}
< link rel = "stylesheet" type = "text/css" href = "{{ $darkstyle.Permalink }}" { { if eq . Site . Params . mode " auto " } } media = "(prefers-color-scheme: dark)" { { end } } / >
2020-10-04 19:11:49 +03:00
{{ end }}
2021-06-08 22:57:36 +03:00
2020-10-04 19:11:49 +03:00
<!-- Custom CSS style get applied last -->
{{- if isset .Site.Params "customcss" }}
{{ range .Site.Params.customCSS }}
2021-06-08 22:57:36 +03:00
{{ $customstyle := resources.Get . | fingerprint }}
< link rel = "stylesheet" type = "text/css" href = "{{ $customstyle.Permalink }}" >
2020-10-04 19:11:49 +03:00
{{ end }}
2020-04-16 10:20:38 +03:00
{{- end -}}
2020-04-08 21:44:29 +03:00
{{- range .Site.Params.customJS }}
{{- if or (hasPrefix . "http://") (hasPrefix . "https://") }}
< script src = "{{ . }}" > < / script >
{{- else }}
< script src = "{{ $.Site.BaseURL }}{{ . }}" > < / script >
{{- end }}
{{- end }}
2020-10-04 19:11:49 +03:00
< / head >