feat(assets): add SRI config for stylesheet and script

This commit is contained in:
Dillon
2020-03-09 20:25:55 +08:00
parent ac08e0776e
commit 924692a07e
24 changed files with 62 additions and 32 deletions

View File

@@ -0,0 +1,7 @@
{{- $res := .resource -}}
{{- with .fingerprint -}}
{{- $res = $res | resources.Fingerprint . -}}
<script src="{{ $res.RelPermalink }}" integrity="{{ $res.Data.Integrity }}"></script>
{{- else -}}
<script src="{{ $res.RelPermalink }}"></script>
{{- end -}}