aboutsummaryrefslogtreecommitdiff
path: root/site/layouts/_default/examples.html
diff options
context:
space:
mode:
authorMartijn Cuppens <[email protected]>2019-06-30 15:24:24 +0200
committerXhmikosR <[email protected]>2019-07-22 16:08:58 +0300
commit3b73dfc44badc90953cc3f4b239b679c9e46cd34 (patch)
tree8e0974846022ccae78daddafa9c0c4011f437874 /site/layouts/_default/examples.html
parentae0baff08762cf356723c71e08afd470780751a5 (diff)
downloadbootstrap-3b73dfc44badc90953cc3f4b239b679c9e46cd34.tar.xz
bootstrap-3b73dfc44badc90953cc3f4b239b679c9e46cd34.zip
Allow to pass integrity & async attribute to extra js
Diffstat (limited to 'site/layouts/_default/examples.html')
-rw-r--r--site/layouts/_default/examples.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/site/layouts/_default/examples.html b/site/layouts/_default/examples.html
index d6050625d..827292d6d 100644
--- a/site/layouts/_default/examples.html
+++ b/site/layouts/_default/examples.html
@@ -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>