itsdrike.com/layouts/partials/script_async.html
2022-05-11 14:38:20 +02:00

10 lines
314 B
HTML

{{ $script := resources.Get . }}
{{ if in . "min" }}
{{ $script = $script | minify | fingerprint }}
{{ else }}
{{ $script = $script | js.Build (dict "minify" true) | fingerprint }}
{{ end }}
<script type="text/javascript" async src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>