-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter-scripts.html
38 lines (34 loc) · 982 Bytes
/
footer-scripts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{% if layout.common-ext-js %}
{% for js in layout.common-ext-js %}
{% include ext-js.html js=js %}
{% endfor %}
{% endif %}
{% if layout.common-js %}
{% for js in layout.common-js %}
<!-- doing something a bit funky here because I want to be careful not to include JQuery twice! -->
{% if js contains 'jquery' %}
<script>
if (typeof jQuery == 'undefined') {
document.write('<script src="{{ js | relative_url }}"></scr' + 'ipt>');
}
</script>
{% else %}
<script src="{{ js | relative_url }}"></script>
{% endif %}
{% endfor %}
{% endif %}
{% if site.site-js %}
{% for js in site.site-js %}
<script src="{{ js | relative_url }}"></script>
{% endfor %}
{% endif %}
{% if page.ext-js %}
{% for js in page.ext-js %}
{% include ext-js.html js=js %}
{% endfor %}
{% endif %}
{% if page.js %}
{% for js in page.js %}
<script src="{{ js | relative_url }}"></script>
{% endfor %}
{% endif %}