1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-20 20:31:26 +02:00

Allow to pass integrity & async attribute to extra js

This commit is contained in:
Martijn Cuppens
2019-06-30 15:24:24 +02:00
committed by XhmikosR
parent ae0baff087
commit 3b73dfc44b
4 changed files with 10 additions and 6 deletions

View File

@@ -50,7 +50,9 @@
{{ end }}
{{ range .Page.Params.extra_js }}
<script src="{{ . }}"></script>
{{ $integrity := .integrity }}
{{ $async := .async }}
<script src="{{ .src }}"{{ with $integrity }} integrity="{{ $integrity }}"{{ end }}{{ with $async }} async{{ end }} crossorigin="anonymous"></script>
{{- end }}
{{ end }}
</body>