mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 11:25:26 +01:00 
			
		
		
		
	Use md5 instead of default sha256 for generating SRI hashes (#195)
reference: https://gohugo.io/hugo-pipes/fingerprint/
This commit is contained in:
		| @@ -31,7 +31,7 @@ | ||||
| {{- $stylesheet := (slice $common $extended) | resources.Concat "assets/css/stylesheet.css" | minify }} | ||||
|  | ||||
| {{- if not .Site.Params.assets.disableFingerprinting }} | ||||
| {{- $stylesheet := $stylesheet | fingerprint -}} | ||||
| {{- $stylesheet := $stylesheet | resources.Fingerprint "md5" -}} | ||||
| <link href="{{ $stylesheet.RelPermalink }}" integrity="{{ $stylesheet.Data.Integrity }}" rel="preload stylesheet" | ||||
|     as="style"> | ||||
| {{- else}} | ||||
| @@ -43,7 +43,7 @@ | ||||
| {{- $fastsearch := resources.Get "js/fastsearch.js" | resources.ExecuteAsTemplate "js/fastsearch.js" .Site.Params.fuseOpts }} | ||||
| {{- $fusejs := resources.Get "js/fuse.js" }} | ||||
| {{- if not .Site.Params.assets.disableFingerprinting }} | ||||
| {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} | ||||
| {{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | resources.Fingerprint "md5" }} | ||||
| <script defer src="{{ $search.RelPermalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script> | ||||
| {{- else}} | ||||
| {{ $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 John
					John