{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }} {{- $resources := slice -}} {{- $resources = $resources | append (resources.Get "/css/main.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 -}} {{ $resources = $resources | append (resources.Get "css/print.css" | resources.ExecuteAsTemplate "print.css" .) -}} {{- $css := $resources | resources.Concat "css/style.css" | minify -}} {{ if or (eq (trim site.BaseURL "/") site.Params.CanonicalBaseURL) (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") -}} {{ else -}} {{ end -}} {{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify -}} {{- $cacheBuster := $webmanifest.Content | crypto.FNV32a -}} {{- $webmanifestFingerprinted := printf "/manifest.%d.webmanifest" $cacheBuster -}} {{- with resources.Copy $webmanifestFingerprinted $webmanifest -}} {{- printf `` .RelPermalink | safeHTML -}} {{- end -}} {{- if or (eq .Section "notes") (eq .Title "Notes") -}} {{- else if or (eq .Section "posts") (eq .Title "Articles") -}} {{- else -}} {{- end }} {{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }} {{ $description := "" -}} {{- if .Params.description -}} {{- $description = .Params.Description -}} {{- else if .IsHome -}} {{- $description = .Site.Params.Description -}} {{- else if .Summary -}} {{- $description = .Summary | replaceRE `\n` ` ` | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘` | truncate 160 | replaceRE ` ([^ ]*)?$` `` | safeHTML -}} {{- end -}} {{ if and (gt .Date 0) (not .Params.evergreen) -}} {{ end -}} {{ if lt .Date .Lastmod -}} {{- end -}} {{ if not (in site.BaseURL ".onion") -}} {{ $icon_svg := partialCached "cache-bust.html" "/favicon.svg" "/favicon.svg" }} {{- printf `` $icon_svg.RelPermalink | safeHTML }} {{- end }} {{ $icon_192 := partialCached "cache-bust.html" "/favicon192.png" "/favicon192.png" }} {{- printf `` $icon_192.RelPermalink | safeHTML -}} {{- if not (or (ne "page" .Kind) (eq $canonicalRelPermalink "/bookmarks/") (eq $canonicalRelPermalink "/posts/")) }} {{- end -}} {{- $og_image := partialCached "cache-bust.html" "/favicon512.png" "/favicon512.png" -}} {{- $og_image_alt := "" -}} {{- with .Params.image -}} {{- $og_image = partial "cache-bust.html" (printf "/p/%s" .) -}} {{- end -}} {{- with .Params.image_alt -}} {{- $og_image_alt = . -}} {{- end }} {{ printf `` $og_image.Permalink | safeHTML }} {{ hugo.Generator | replaceRE ">" " />" | safeHTML}}