1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

Asset organization

- Use the recommended resolution for the open graph image
- Since the mask-icon is onl served as a cache-busted asset and never
  served as a plain link from the site root, move it to assets/
- Cache-bust the webmanifest and put it in assets/
This commit is contained in:
rohan kumar 2020-12-15 23:15:18 -08:00
parent 638cb80ed3
commit 59bc793152
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
5 changed files with 10 additions and 9 deletions

View file

@ -1 +0,0 @@
../static/mask_apple.svg

Before

Width:  |  Height:  |  Size: 24 B

After

Width:  |  Height:  |  Size: 1.1 KiB

1
assets/mask_apple.svg Normal file
View file

@ -0,0 +1 @@
<svg height="1024" width="1024" xmlns="http://www.w3.org/2000/svg"><path d="M348.4 721.7q-15.4 0-30-4.6t-25.3-15.4q-10.8-10.8-15.4-25.3-4.6-14.6-4.6-30t4.6-30q4.6-14.6 15.4-25.3 10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30t-4.6 30q-4.6 14.6-15.4 25.3-10.8 10.8-25.3 15.4-14.6 4.6-30 4.6zm0-268.8q-15.4 0-30-4.6t-25.3-15.4q-10.8-10.8-15.4-25.3-4.6-14.6-4.6-30t4.6-30q4.6-14.6 15.4-25.3 10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30t-4.6 30q-4.6 14.6-15.4 25.3-10.8 10.8-25.3 15.4-14.6 4.6-30 4.6zM654.8 873l-58.4-44.5q45.3-53.8 64.5-107.5-17.7-2.3-33-12.3-14.6-10.8-21.5-27.6-6.1-16.9-6.1-34.6 0-15.4 4.6-30t15.4-25.3q10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30v3.8q-1.5 111.4-96 222.7zm20.7-420.1q-15.4 0-30-4.6t-25.3-15.4q-10.8-10.8-15.4-25.3-4.6-14.6-4.6-30t4.6-30q4.6-14.6 15.4-25.3 10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30t-4.6 30q-4.6 14.6-15.4 25.3-10.8 10.8-25.3 15.4-14.6 4.6-30 4.6z"/></svg>

Before

Width:  |  Height:  |  Size: 24 B

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
assets/open_graph.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View file

@ -1 +0,0 @@
<svg height="1024" width="1024" xmlns="http://www.w3.org/2000/svg"><path d="M348.4 721.7q-15.4 0-30-4.6t-25.3-15.4q-10.8-10.8-15.4-25.3-4.6-14.6-4.6-30t4.6-30q4.6-14.6 15.4-25.3 10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30t-4.6 30q-4.6 14.6-15.4 25.3-10.8 10.8-25.3 15.4-14.6 4.6-30 4.6zm0-268.8q-15.4 0-30-4.6t-25.3-15.4q-10.8-10.8-15.4-25.3-4.6-14.6-4.6-30t4.6-30q4.6-14.6 15.4-25.3 10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30t-4.6 30q-4.6 14.6-15.4 25.3-10.8 10.8-25.3 15.4-14.6 4.6-30 4.6zM654.8 873l-58.4-44.5q45.3-53.8 64.5-107.5-17.7-2.3-33-12.3-14.6-10.8-21.5-27.6-6.1-16.9-6.1-34.6 0-15.4 4.6-30t15.4-25.3q10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30v3.8q-1.5 111.4-96 222.7zm20.7-420.1q-15.4 0-30-4.6t-25.3-15.4q-10.8-10.8-15.4-25.3-4.6-14.6-4.6-30t4.6-30q4.6-14.6 15.4-25.3 10.8-10.8 25.3-15.4 14.6-4.6 30-4.6t30 4.6q14.6 4.6 25.3 15.4 10.8 10.8 15.4 25.3 4.6 14.6 4.6 30t-4.6 30q-4.6 14.6-15.4 25.3-10.8 10.8-25.3 15.4-14.6 4.6-30 4.6z"/></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -14,12 +14,13 @@
{{ printf `<link rel="apple-touch-icon" href="%s">` $icon_192.RelPermalink | safeHTML }}
{{ $mask_icon := resources.Get "/mask_apple.svg" | resources.Fingerprint "md5" -}}
{{ printf `<link rel="mask-icon" href="%s" color="black">` $mask_icon.RelPermalink | 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 }}"/>
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.Fingerprint "md5" -}}
{{ 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 }}">
{{ if eq .Site.BaseURL "https://envs.net/~seirdy/" -}}
<meta name="robots" content="noindex">
{{ else -}}
<link rel="canonical" href="https://seirdy.one{{ .RelPermalink }}"/>
<link rel="canonical" href="https://seirdy.one{{ .RelPermalink }}">
{{ end -}}
{{ $resources := slice -}}
{{ $resources = $resources | append (resources.Get "/css/main.css") -}}
@ -48,9 +49,10 @@
{{- else }}
<meta property="og:type" content="website">
{{- end }}
{{ printf `<meta property="og:image" content="%s">` $icon_192.Permalink | safeHTML }}
{{ $og_image := resources.Get "/open_graph.png" | resources.Fingerprint "md5" -}}
{{ 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="192">
<meta property="og:image:width" content="192">
<meta property="og:url" content="https://seirdy.one{{ .RelPermalink }}"/>
<meta property="og:image:height" content="630">
<meta property="og:image:width" content="1200">
<meta property="og:url" content="https://seirdy.one{{ .RelPermalink }}">
</head>