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

Remove SRI for icons

Apparently SRI is only valid for rel attrs with the value "stylesheet",
"preload", or "modulepreload".
This commit is contained in:
rohan kumar 2020-12-14 23:02:07 -08:00
parent 337e34739f
commit 8af072a0be
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -4,16 +4,16 @@
{{ with .Site.Params.description -}} {{ with .Site.Params.description -}}
<meta name="description" content="{{ . }}"> <meta name="description" content="{{ . }}">
{{ end }} {{ end }}
{{- $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "sha384" -}} {{- $icon_192 := resources.Get "/apple-touch-icon.png" | resources.Fingerprint "md5" -}}
{{ printf `<link rel="icon" sizes="192x192" href="%s" type="image/png" integrity="%s">` $icon_192.RelPermalink $icon_192.Data.Integrity | safeHTML }} {{ printf `<link rel="icon" sizes="192x192" href="%s" type="image/png">` $icon_192.RelPermalink | safeHTML }}
{{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "sha384" -}} {{ $favicon := resources.Get "/favicon.png" | resources.Fingerprint "md5" -}}
{{ printf `<link rel="icon" sizes="32x32" href="%s" type="image/png" integrity="%s">` $favicon.RelPermalink $favicon.Data.Integrity | safeHTML -}} {{ printf `<link rel="icon" sizes="32x32" href="%s" type="image/png">` $favicon.RelPermalink | safeHTML -}}
<!--apple-touch-icon and mask-icon used to be appple-specific, but now <!--apple-touch-icon and mask-icon used to be appple-specific, but now
they're pseudo-standards relied upon by other vendors too. See they're pseudo-standards relied upon by other vendors too. See
https://html.spec.whatwg.org/multipage/semantics.html#attr-link-sizes--> https://html.spec.whatwg.org/multipage/semantics.html#attr-link-sizes-->
{{ printf `<link rel="apple-touch-icon" href="%s" integrity="%s">` $icon_192.RelPermalink $icon_192.Data.Integrity | safeHTML }} {{ printf `<link rel="apple-touch-icon" href="%s">` $icon_192.RelPermalink | safeHTML }}
{{ $mask_icon := resources.Get "/mask.svg" | resources.Fingerprint "sha384" -}} {{ $mask_icon := resources.Get "/mask.svg" | resources.Fingerprint "md5" -}}
{{ printf `<link rel="mask-icon" href="%s" integrity="%s" color="black">` $mask_icon.RelPermalink $mask_icon.Data.Integrity | safeHTML }} {{ printf `<link rel="mask-icon" href="%s" color="black">` $mask_icon.RelPermalink | safeHTML }}
<link rel="manifest" href="{{ .Site.BaseURL }}manifest.webmanifest"> <link rel="manifest" href="{{ .Site.BaseURL }}manifest.webmanifest">
<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/" -}}