compose-theme/layouts/partials/scripts/getJsBundle.html
2024-07-26 17:08:59 +02:00

8 lines
No EOL
267 B
HTML

{{- $bundle := .scripts | resources.Concat (printf "js/%s.js" .slug) | resources.Minify | resources.Fingerprint "sha512" }}
{{- if .inline }}
<script>
{{ safeJS $bundle.Content }}
</script>
{{- else }}
<script src="{{ $bundle.Permalink }}" async></script>
{{ end }}