1
0
Fork 0
mirror of https://github.com/GuerillaHQ/now-playing synced 2024-06-27 14:01:35 +00:00

add subresource integrity for the CSS

This commit is contained in:
Tixie 2019-12-03 22:21:38 +01:00
parent 6b8bd255e6
commit 69e3405ab2

View file

@ -37,7 +37,8 @@
{{ $sass := resources.Get "/scss/style.scss" }}
{{ $style := $sass | resources.ToCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ $secureStyle := $style | resources.Fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $secureStyle.Permalink }}" integrity="{{ $secureStyle.Data.Integrity }}">
</head>
<body class="sans-serif">
@ -51,7 +52,7 @@
<script>
window.albumsUrls = [
{{ range where .Site.RegularPages "Type" "in" "musics" }}
"{{ .Permalink}}",
"{{ .Permalink }}",
{{ end }}
]
</script>