1
0
Fork 0
mirror of https://github.com/GuerillaHQ/now-playing synced 2024-07-04 07:37:56 +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" }} {{ $sass := resources.Get "/scss/style.scss" }}
{{ $style := $sass | resources.ToCSS | minify | fingerprint }} {{ $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> </head>
<body class="sans-serif"> <body class="sans-serif">
@ -51,7 +52,7 @@
<script> <script>
window.albumsUrls = [ window.albumsUrls = [
{{ range where .Site.RegularPages "Type" "in" "musics" }} {{ range where .Site.RegularPages "Type" "in" "musics" }}
"{{ .Permalink}}", "{{ .Permalink }}",
{{ end }} {{ end }}
] ]
</script> </script>