mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 02:33:40 -04:00
fix: wrong SRI hash for katex.css (#702)
* Correct URL given in 'dev.toml' * stylesheet 'katex.css': fix SRI hash
This commit is contained in:

committed by
GitHub

parent
9c2a9f600b
commit
b43870a538
2
dev.toml
2
dev.toml
@ -1,5 +1,5 @@
|
|||||||
# Theme development config for exampleSite
|
# Theme development config for exampleSite
|
||||||
# https://gohugo.io/getting-started/configuration/#configure-cache-busters
|
# https://gohugo.io/configuration/build/#cache-busters
|
||||||
[build]
|
[build]
|
||||||
[build.buildStats]
|
[build.buildStats]
|
||||||
enable = true
|
enable = true
|
||||||
|
@ -98,7 +98,8 @@
|
|||||||
{{ else with .Value -}}
|
{{ else with .Value -}}
|
||||||
{{ $katexCssContent := strings.Replace .Content $katexFontPattern $katexFontSubstituted }}
|
{{ $katexCssContent := strings.Replace .Content $katexFontPattern $katexFontSubstituted }}
|
||||||
{{ with resources.FromString (printf "css/katex%s.css" (cond hugo.IsProduction ".min" "")) $katexCssContent -}}
|
{{ with resources.FromString (printf "css/katex%s.css" (cond hugo.IsProduction ".min" "")) $katexCssContent -}}
|
||||||
<link rel="stylesheet" href="{{- .RelPermalink -}}" integrity="{{- . | fingerprint -}}" crossorigin="anonymous" />
|
{{ $cssHash := . | fingerprint "sha512" -}}
|
||||||
|
<link rel="stylesheet" href="{{- .RelPermalink -}}" integrity="{{- $cssHash.Data.Integrity -}}" crossorigin="anonymous" />
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
Reference in New Issue
Block a user