1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-15 01:42:10 +00:00
seirdy.one/themes/etch-custom/layouts/partials/head.html

44 lines
2.6 KiB
HTML
Raw Normal View History

<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ with .Site.Params.description -}}
<meta name="description" content="{{ . }}">
{{ end }}
{{- $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" integrity="%s">` $icon_192.RelPermalink $icon_192.Data.Integrity | safeHTML }}
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="icon" sizes="32x32" href="%s" type="image/png" integrity="%s">` $favicon.RelPermalink $favicon.Data.Integrity | safeHTML -}}
<!--apple-touch-icon and mask-icon used to be appple-specific, but now
they're pseudo-standards relied upon by other vendors too. See
https://html.spec.whatwg.org/multipage/semantics.html#attr-link-sizes-->
{{ printf `<link rel="apple-touch-icon" href="%s" integrity="%s">` $icon_192.RelPermalink $icon_192.Data.Integrity | safeHTML }}
{{ $mask_icon := resources.Get "/mask.svg" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="mask-icon" href="%s" integrity="%s" color="black">` $mask_icon.RelPermalink $mask_icon.Data.Integrity | safeHTML }}
<link rel="manifest" href="{{ .Site.BaseURL }}manifest.webmanifest">
<link rel="alternate" type="application/rss+xml" href="{{ .Site.BaseURL }}posts/index.xml" title="{{ $.Site.Title }}"/>
{{ if eq .Site.BaseURL "https://envs.net/~seirdy/" -}}
<meta name="robots" content="noindex">
{{ else -}}
<link rel="canonical" href="https://seirdy.one{{ .RelPermalink }}"/>
{{ end -}}
{{ $resources := slice -}}
{{ $resources = $resources | append (resources.Get "/css/main.css") -}}
{{ $resources = $resources | append (resources.Get "/css/narrow.css") -}}
{{ $dark := .Site.Params.dark | default "auto" -}}
{{ if not (eq $dark "off") -}}
{{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
{{ end -}}
{{ $css := $resources | resources.Concat "css/style.css" | minify | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="stylesheet" href="%s" integrity="%s">` $css.RelPermalink $css.Data.Integrity | safeHTML }}
{{ if .Params.highlight -}}
{{ $css_syntax := resources.Get "/css/syntax.css" | minify | resources.Fingerprint "sha384" }}
{{- printf `<link rel="stylesheet" href="%s" integrity="%s">` $css_syntax.RelPermalink $css_syntax.Data.Integrity | safeHTML }}
{{ end -}}
2020-12-01 01:19:33 +00:00
{{ if eq .RelPermalink "/" -}}
<title>{{ .Title }}</title>
2020-12-01 01:19:33 +00:00
{{ else -}}
<title>{{ .Title }} - Seirdy</title>
{{ end -}}
</head>