mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 12:52:10 +00:00
Metadata: description + cache-bust manifest icons
- Add a cache-busting fingerprint to all the icons in the webmanifest - Add a <meta> and open graph tag for a description. - Include a 512px icon in the manifest
This commit is contained in:
parent
ac0ced6aac
commit
b9e4be50f5
10 changed files with 40 additions and 16 deletions
1
assets/favicon.svg
Symbolic link
1
assets/favicon.svg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../static/favicon.svg
|
BIN
assets/favicon512.png
Normal file
BIN
assets/favicon512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -1,25 +1,36 @@
|
||||||
|
{{- $192png := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" }}
|
||||||
|
{{- $512png := resources.Get "/favicon512.png" | resources.Fingerprint "md5" }}
|
||||||
|
{{- $1024svg := resources.Get "/favicon.svg" | resources.Fingerprint "md5" }}
|
||||||
|
{{- $maskablesvg := resources.Get "/maskable_android.svg" | resources.Fingerprint "md5" -}}
|
||||||
{
|
{
|
||||||
"name": "Seirdy's Home",
|
"name": "Seirdy's Home",
|
||||||
"short_name": "Seirdy",
|
"short_name": "Seirdy",
|
||||||
|
"description": "{{ .Site.Params.Description }}",
|
||||||
"display": "browser",
|
"display": "browser",
|
||||||
"scope": "/",
|
"scope": "/",
|
||||||
"start_url": ".",
|
"start_url": "/",
|
||||||
"icons": [
|
"icons": [
|
||||||
{
|
{
|
||||||
"src": "https://seirdy.one/apple-touch-icon.png",
|
"src": "{{ $192png.Permalink }}",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "any"
|
"purpose": "any"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https://seirdy.one/favicon.svg",
|
"src": "{{ $512png.Permalink }}",
|
||||||
"sizes": "1024x1024",
|
"sizes": "512x512",
|
||||||
|
"type": "image/png",
|
||||||
|
"purpose": "any"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "{{ $1024svg.Permalink }}",
|
||||||
|
"sizes": "1024x1024 512x512 384x384 192x192 180x180 152x152",
|
||||||
"type": "image/svg+xml",
|
"type": "image/svg+xml",
|
||||||
"purpose": "any"
|
"purpose": "any"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "https://seirdy.one/maskable_android.svg",
|
"src": "{{ $maskablesvg.Permalink }}",
|
||||||
"sizes": "1024x1024",
|
"sizes": "1024x1024 512x512 384x384 192x192 180x180 152x152",
|
||||||
"type": "image/svg+xml",
|
"type": "image/svg+xml",
|
||||||
"purpose": "maskable"
|
"purpose": "maskable"
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
@ -10,7 +10,7 @@ pygmentsCodeFences = true
|
||||||
pygmentsUseClasses = true
|
pygmentsUseClasses = true
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
description = "Seirdy's Home"
|
description = "Seirdy's Home: personal website and blog for Rohan Kumar, A.K.A. Seirdy"
|
||||||
src = "https://sr.ht/~seirdy/seirdy.one"
|
src = "https://sr.ht/~seirdy/seirdy.one"
|
||||||
copyright = "Copyright © 2020 Rohan Kumar"
|
copyright = "Copyright © 2020 Rohan Kumar"
|
||||||
dark = "auto"
|
dark = "auto"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
date: "2020-11-17T13:13:03-08:00"
|
date: "2020-11-17T13:13:03-08:00"
|
||||||
|
description: A seires on setting up resilient git-based project workflows, free of
|
||||||
|
vendor lock-in.
|
||||||
outputs:
|
outputs:
|
||||||
- html
|
- html
|
||||||
- gemtext
|
- gemtext
|
||||||
|
@ -40,7 +42,8 @@ project's "bus factor".
|
||||||
Providing a way to get everything offline, in a format that won't go obsolete if a
|
Providing a way to get everything offline, in a format that won't go obsolete if a
|
||||||
project dies, is the key to a resilient git workflow.
|
project dies, is the key to a resilient git workflow.
|
||||||
|
|
||||||
## Before we start: FAQ
|
Before we start: FAQ
|
||||||
|
--------------------
|
||||||
|
|
||||||
Q: What level of experience does this series expect?
|
Q: What level of experience does this series expect?
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
date: "2020-11-18T18:31:15-08:00"
|
date: "2020-11-18T18:31:15-08:00"
|
||||||
|
description: Efficient redundancy via repository mirroring with nothing but git.
|
||||||
outputs:
|
outputs:
|
||||||
- html
|
- html
|
||||||
- gemtext
|
- gemtext
|
||||||
|
@ -30,7 +31,8 @@ reports, get code, or send patches? Do maintainers need to check multiple places
|
||||||
No. Of course not. A good distributed system should automatically keep its nodes in
|
No. Of course not. A good distributed system should automatically keep its nodes in
|
||||||
sync to avoid the hassle of checking multiple places for updates.
|
sync to avoid the hassle of checking multiple places for updates.
|
||||||
|
|
||||||
## Adding remotes
|
Adding remotes
|
||||||
|
--------------
|
||||||
|
|
||||||
This process should pretty straightforward. You can run `git remote add` (see
|
This process should pretty straightforward. You can run `git remote add` (see
|
||||||
`git-remote(1)`) or edit your repo's `.git/config` directly:
|
`git-remote(1)`) or edit your repo's `.git/config` directly:
|
||||||
|
@ -51,7 +53,8 @@ If that's too much work--a perfectly understandable complaint--automating the pr
|
||||||
is trivial. Here's [an example from my
|
is trivial. Here's [an example from my
|
||||||
dotfiles](https://git.sr.ht/~seirdy/dotfiles/tree/master/Executables/shell-scripts/bin/git-remote-setup).
|
dotfiles](https://git.sr.ht/~seirdy/dotfiles/tree/master/Executables/shell-scripts/bin/git-remote-setup).
|
||||||
|
|
||||||
## Seamless pushing and pulling
|
Seamless pushing and pulling
|
||||||
|
----------------------------
|
||||||
|
|
||||||
Having multiple remotes is fine, but pushing to and fetching from all of them can be
|
Having multiple remotes is fine, but pushing to and fetching from all of them can be
|
||||||
slow. Two simple git aliases fix that:
|
slow. Two simple git aliases fix that:
|
||||||
|
@ -66,13 +69,15 @@ Now, `git pushall` and `git fetchall` will push to and fetch from all remotes in
|
||||||
parallel, respectively. Only one remote needs to be online for project members to
|
parallel, respectively. Only one remote needs to be online for project members to
|
||||||
keep working.
|
keep working.
|
||||||
|
|
||||||
## Advertising remotes
|
Advertising remotes
|
||||||
|
-------------------
|
||||||
|
|
||||||
I'd recommend advertising at least three remotes in your README: your personal
|
I'd recommend advertising at least three remotes in your README: your personal
|
||||||
favorite and two determined by popularity. Tell users to run `git remote set-url` to
|
favorite and two determined by popularity. Tell users to run `git remote set-url` to
|
||||||
switch remote locations if one goes down.
|
switch remote locations if one goes down.
|
||||||
|
|
||||||
## Before you ask...
|
Before you ask...
|
||||||
|
-----------------
|
||||||
|
|
||||||
Q: Why not use a cloud service to automate mirroring?
|
Q: Why not use a cloud service to automate mirroring?
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
date: "2020-11-02T11:06:56-08:00"
|
date: "2020-11-02T11:06:56-08:00"
|
||||||
|
description: Seirdy's obligatory inagural blog post, which is barely longer than this
|
||||||
|
description.
|
||||||
outputs:
|
outputs:
|
||||||
- html
|
- html
|
||||||
- gemtext
|
- gemtext
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
date: "2020-11-23T12:21:35-08:00"
|
date: "2020-11-23T12:21:35-08:00"
|
||||||
|
description: A lengthy guide to making small sites that focus on content rather than
|
||||||
|
form.
|
||||||
outputs:
|
outputs:
|
||||||
- html
|
- html
|
||||||
- gemtext
|
- gemtext
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
{{ with .Site.Params.description -}}
|
<meta name="description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
||||||
<meta name="description" content="{{ . }}">
|
<meta name="author" content="{{ .Site.Author.name }}">
|
||||||
{{ end }}
|
|
||||||
{{- $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}
|
{{- $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}
|
||||||
{{ printf `<link rel="icon" sizes="192x192" href="%s" type="image/png">` $icon_192.RelPermalink | safeHTML }}
|
{{ printf `<link rel="icon" sizes="192x192" href="%s" type="image/png">` $icon_192.RelPermalink | safeHTML }}
|
||||||
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
|
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
|
||||||
|
@ -15,7 +14,7 @@
|
||||||
{{ $mask_icon := resources.Get "/mask_apple.svg" | resources.Fingerprint "md5" -}}
|
{{ $mask_icon := resources.Get "/mask_apple.svg" | resources.Fingerprint "md5" -}}
|
||||||
{{ printf `<link rel="mask-icon" href="%s" color="black">` $mask_icon.RelPermalink | safeHTML }}
|
{{ printf `<link rel="mask-icon" href="%s" color="black">` $mask_icon.RelPermalink | safeHTML }}
|
||||||
<!-- webmanifest defines even more icons. This is getting ridiculous -->
|
<!-- webmanifest defines even more icons. This is getting ridiculous -->
|
||||||
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.Fingerprint "md5" -}}
|
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Fingerprint "md5" -}}
|
||||||
{{ printf `<link rel="manifest" href="%s">` $webmanifest.RelPermalink | safeHTML }}
|
{{ printf `<link rel="manifest" href="%s">` $webmanifest.RelPermalink | safeHTML }}
|
||||||
<link rel="alternate" type="application/rss+xml" href="{{ .Site.BaseURL }}posts/index.xml" title="{{ $.Site.Title }}">
|
<link rel="alternate" type="application/rss+xml" href="{{ .Site.BaseURL }}posts/index.xml" title="{{ $.Site.Title }}">
|
||||||
{{ if eq .Site.BaseURL "https://envs.net/~seirdy/" -}}
|
{{ if eq .Site.BaseURL "https://envs.net/~seirdy/" -}}
|
||||||
|
@ -62,4 +61,5 @@
|
||||||
<meta property="og:image:height" content="630">
|
<meta property="og:image:height" content="630">
|
||||||
<meta property="og:image:width" content="1200">
|
<meta property="og:image:width" content="1200">
|
||||||
<meta property="og:url" content="https://seirdy.one{{ .RelPermalink }}">
|
<meta property="og:url" content="https://seirdy.one{{ .RelPermalink }}">
|
||||||
|
<meta property="og:description" content="{{ if .Params.description }}{{ .Params.description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in a new issue