footer-scripts.html 965 B

12345678910111213141516171819202122232425262728293031323334
  1. {% if layout.common-ext-js %}
  2. {% for js in layout.common-ext-js %}
  3. {% include ext-js.html js=js %}
  4. {% endfor %}
  5. {% endif %}
  6. {% if page.ext-js %}
  7. {% for js in page.ext-js %}
  8. {% include ext-js.html js=js %}
  9. {% endfor %}
  10. {% endif %}
  11. {% if page.js %}
  12. {% for js in page.js %}
  13. <script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
  14. {% endfor %}
  15. {% endif %}
  16. {% if layout.common-js %}
  17. {% for js in layout.common-js %}
  18. <!-- doing something a bit funky here because I want to be careful not to include JQuery twice! -->
  19. {% if js contains 'jquery' %}
  20. <script>
  21. if (typeof jQuery == 'undefined') {
  22. document.write('<script src="{{ js | prepend: site.baseurl | replace: "//", "/" }}"></scr' + 'ipt>');
  23. }
  24. </script>
  25. {% else %}
  26. <script src="{{ js | prepend: site.baseurl | replace: '//', '/' }}"></script>
  27. {% endif %}
  28. {% endfor %}
  29. {% endif %}
  30. {% include google_analytics.html %}