itsdrike.com/layouts/partials/script_async.html

10 lines
318 B
HTML
Raw Normal View History

2021-08-25 09:27:49 +00:00
{{ $script := resources.Get . }}
{{ if in . "min" }}
2021-08-26 00:06:40 +00:00
{{ $script = $script | minify | fingerprint }}
2021-08-25 09:27:49 +00:00
{{ else }}
2021-08-26 00:06:40 +00:00
{{ $script = $script | js.Build (dict "minify" true) | fingerprint }}
2021-08-25 09:27:49 +00:00
{{ end }}
<script type="text/javascript" async src="{{ $script.RelPermalink }}" integrity="{{ $script.Data.Integrity }}"></script>