mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-10 00:12:09 +00:00
Fingerprint webmanifest with FNV32a instead of md5
This commit is contained in:
parent
bf8aadf8bb
commit
b1c5584679
1 changed files with 6 additions and 2 deletions
|
@ -19,8 +19,12 @@
|
||||||
<link href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}" rel="canonical" />
|
<link href="{{ .Site.Params.CanonicalBaseURL }}{{ $canonicalRelPermalink }}" rel="canonical" />
|
||||||
<link href="{{ .Site.Params.WebmentionEndpoint }}" rel="webmention" />
|
<link href="{{ .Site.Params.WebmentionEndpoint }}" rel="webmention" />
|
||||||
<link href="{{ printf `https://webmention.io/webmention?forward=%s` .Site.Params.WebmentionEndpoint}}" rel="pingback" />
|
<link href="{{ printf `https://webmention.io/webmention?forward=%s` .Site.Params.WebmentionEndpoint}}" rel="pingback" />
|
||||||
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify | resources.Fingerprint "md5" -}}
|
{{ $webmanifest := resources.Get "/manifest.webmanifest" | resources.ExecuteAsTemplate "manifest.webmanifest" . | resources.Minify -}}
|
||||||
{{- printf `<link href="%s" rel="manifest" />` $webmanifest.RelPermalink | safeHTML -}}
|
{{- $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 -}}
|
||||||
<!--Feeds for both notes and articles; articles come first unless we're in the notes section.-->
|
<!--Feeds for both notes and articles; articles come first unless we're in the notes section.-->
|
||||||
{{- if or (eq .Section "notes") (eq .Title "Notes") -}}
|
{{- if or (eq .Section "notes") (eq .Title "Notes") -}}
|
||||||
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
<link rel="alternate" type="application/atom+xml" href="{{ site.BaseURL }}notes/atom.xml" title="Notes" />
|
||||||
|
|
Loading…
Reference in a new issue