1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-27 10:52:09 +00:00
seirdy.one/themes/etch-custom/layouts/partials/head.html

41 lines
2.2 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 }}
{{- $favicon := resources.Get "/favicon.png" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="shortcut icon" href="%s" integrity="%s">` $favicon.RelPermalink $favicon.Data.Integrity | safeHTML }}
<link href="{{ .Site.BaseURL }}posts/index.xml" rel="alternate" type="application/rss+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 -}}
<!--It used to be appple-specific, but now it's a pseudo-standard
relied upon by other vendors too.-->
{{- $apple_icon := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="apple-touch-icon" href="%s" integrity="%s">` $apple_icon.RelPermalink $apple_icon.Data.Integrity | safeHTML }}
{{- $mask_icon := resources.Get "/mask.svg" | resources.Fingerprint "sha384" -}}
{{ printf `<link rel="mask" href="%s" integrity="%s">` $mask_icon.RelPermalink $mask_icon.Data.Integrity | safeHTML }}
{{ $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>