fix: add integrity attribute to styles css preload tag (#83)

This commit is contained in:
Xin
2023-09-23 22:42:05 +01:00
committed by GitHub
parent fdc30c6cd5
commit 0e9cf1a519

View File

@ -7,7 +7,7 @@
{{- if hugo.IsProduction }} {{- if hugo.IsProduction }}
{{- $styles = $styles | minify | fingerprint }} {{- $styles = $styles | minify | fingerprint }}
<link rel="preload" href="{{ $styles.RelPermalink }}" as="style" /> <link rel="preload" href="{{ $styles.RelPermalink }}" as="style" integrity="{{ $styles.Data.Integrity }}" />
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" integrity="{{ $styles.Data.Integrity }}" /> <link href="{{ $styles.RelPermalink }}" rel="stylesheet" integrity="{{ $styles.Data.Integrity }}" />
{{- else }} {{- else }}
<link href="{{ $styles.RelPermalink }}" rel="stylesheet" /> <link href="{{ $styles.RelPermalink }}" rel="stylesheet" />