2022-02-04 00:19:26 +00:00
|
|
|
|
<head>
|
2022-06-02 00:30:47 +00:00
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
|
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
|
2022-06-02 05:11:40 +00:00
|
|
|
|
<meta name="disabled-adaptations" content="watch" />
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
|
|
|
|
<!-- inline CSS; remember to allow it with a hash in the CSP -->
|
|
|
|
|
{{- $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 -}}
|
|
|
|
|
<style>{{ $css.Content | safeCSS }}</style>
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{ if or (eq site.BaseURL site.Params.CanonicalBaseURL) (in site.BaseURL "wgq3bd2kqoybhstp77i3wrzbfnsyd27wt34psaja4grqiezqircorkyd.onion") -}}
|
|
|
|
|
<meta name="robots" content="index,follow,max-image-preview:large,max-snippet=-1" />
|
|
|
|
|
{{ end -}}
|
|
|
|
|
<link href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}" rel="canonical" />
|
|
|
|
|
<link href="{{ .Site.Params.WebmentionEndpoint }}" rel="webmention" />
|
2023-08-08 00:50:36 +00:00
|
|
|
|
<link href="{{ printf `https://webmention.io/webmention?forward=%s` .Site.Params.WebmentionEndpoint}}" rel="pingback" />
|
2024-01-30 23:02:00 +00:00
|
|
|
|
{{ $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 `<link href="%s" rel="manifest" />` .RelPermalink | safeHTML -}}
|
|
|
|
|
{{- end -}}
|
2022-06-20 03:15:56 +00:00
|
|
|
|
<!--Feeds for both notes and articles; articles come first unless we're in the notes section.-->
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- if or (eq .Section "notes") (eq .Title "Notes") -}}
|
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
2022-06-06 19:16:33 +00:00
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
|
2022-06-20 03:15:56 +00:00
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Articles" />
|
|
|
|
|
{{- else if or (eq .Section "posts") (eq .Title "Articles") -}}
|
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Articles" />
|
2022-06-06 19:16:33 +00:00
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
|
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
|
|
|
|
{{- else -}}
|
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}atom.xml" title="All content" />
|
2022-06-20 03:15:56 +00:00
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}posts/atom.xml" title="Articles" />
|
2022-06-06 19:16:33 +00:00
|
|
|
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- end }}
|
|
|
|
|
<title>{{ .Title }}{{ if and (lt (len .Title) 54) (ne $canonicalRelPermalink "/") }} - Seirdy{{ end }}</title>
|
2022-07-13 05:55:45 +00:00
|
|
|
|
{{ $description := "" -}}
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- if .Params.description -}}
|
|
|
|
|
{{- $description = .Params.Description -}}
|
2022-07-13 05:55:45 +00:00
|
|
|
|
{{- else if .IsHome -}}
|
|
|
|
|
{{- $description = .Site.Params.Description -}}
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- else if .Summary -}}
|
2022-10-24 19:27:19 +00:00
|
|
|
|
{{- $description = .Summary | replaceRE `\n` ` ` | replaceRE `\’` `’` | replaceRE `\ ` `\ ` | replaceRE `\“` `“` | replaceRE `\”` `”` | replaceRE `\…` `—` | replaceRE `\—` `—` | replaceRE `\­` `\­` | replaceRE `‘` `‘` | truncate 160 | replaceRE ` ([^ ]*)?$` `` | safeHTML -}}
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- end -}}
|
|
|
|
|
<meta name="description" content="{{ $description }}" />
|
|
|
|
|
<meta name="author" content="{{ .Site.Author.name }}" />
|
|
|
|
|
<meta property="article:author" content="{{ .Site.Author.name }}" />
|
|
|
|
|
{{ if and (gt .Date 0) (not .Params.evergreen) -}}
|
2023-11-29 13:52:05 +00:00
|
|
|
|
<meta property="article:published_time" content="{{ .Date.UTC.Format "2006-01-02T15:04:05Z07:00" }}" />
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{ end -}}
|
|
|
|
|
{{ if lt .Date .Lastmod -}}
|
2023-11-29 13:52:05 +00:00
|
|
|
|
<meta property="article:modified_time" content="{{ .Lastmod.UTC.Format "2006-01-02T15:04:05Z07:00" }}" />
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- end -}}
|
|
|
|
|
<!--the Tor Browser's safest setting disables SVGs but still downloads them to avoid fingerprinting-->
|
|
|
|
|
{{ if not (in site.BaseURL ".onion") -}}
|
2023-12-08 23:10:41 +00:00
|
|
|
|
{{ $icon_svg := partialCached "cache-bust.html" "/favicon.svg" "/favicon.svg" }}
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- printf `<link rel="icon" sizes="any" href="%s" type="image/svg+xml" />` $icon_svg.RelPermalink | safeHTML }}
|
|
|
|
|
{{- end }}
|
2023-12-08 23:10:41 +00:00
|
|
|
|
{{ $icon_192 := partialCached "cache-bust.html" "/favicon192.png" "/favicon192.png" }}
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" />` $icon_192.RelPermalink | safeHTML -}}
|
|
|
|
|
<meta name="color-scheme" content="light dark" />
|
|
|
|
|
<meta name="format-detection" content="telephone=no" /><!-- Why does apple do this -->
|
2022-06-02 04:50:48 +00:00
|
|
|
|
<meta name="theme-color" content="#191919" media="(prefers-color-scheme:dark)" />
|
2022-06-02 00:30:47 +00:00
|
|
|
|
<meta name="theme-color" content="#fff" media="(prefers-color-scheme:light)" />
|
|
|
|
|
<meta property="og:title" content="{{ .Title }}" />
|
|
|
|
|
<meta property="og:site_name" content="{{ $.Site.Title }}" />
|
|
|
|
|
{{- if not (or (ne "page" .Kind) (eq $canonicalRelPermalink "/bookmarks/") (eq $canonicalRelPermalink "/posts/")) }}
|
|
|
|
|
<meta property="og:type" content="article" />
|
|
|
|
|
{{- end -}}
|
|
|
|
|
<!-- ANOTHER meta image?! When will it end? -->
|
2023-12-08 23:10:41 +00:00
|
|
|
|
{{- $og_image := partialCached "cache-bust.html" "/favicon512.png" "/favicon512.png" -}}
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- $og_image_alt := "" -}}<!--Default open graph image is purely decorative and visual, so it should be hidden from assistive technologies.-->
|
|
|
|
|
{{- with .Params.image -}}
|
2023-12-08 23:10:41 +00:00
|
|
|
|
{{- $og_image = partial "cache-bust.html" (printf "/p/%s" .) -}}
|
2022-06-02 00:30:47 +00:00
|
|
|
|
{{- end -}}
|
|
|
|
|
{{- with .Params.image_alt -}}
|
|
|
|
|
{{- $og_image_alt = . -}}
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{ printf `<meta property="og:image" content="%s" />` $og_image.Permalink | safeHTML }}
|
|
|
|
|
<meta property="og:image:type" content="image/png" />
|
|
|
|
|
<meta property="og:image:height" content="{{ $og_image.Height }}" /><meta property="og:image:width" content="{{ $og_image.Width }}" />
|
|
|
|
|
<meta property="og:url" content="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}" />
|
|
|
|
|
<meta property="og:description" content="{{ $description }}" />
|
2023-07-22 22:14:53 +00:00
|
|
|
|
{{ hugo.Generator | replaceRE ">" " />" | safeHTML}}
|
2022-02-04 00:19:26 +00:00
|
|
|
|
</head>
|