js-libs.html 645 B

123456789101112131415161718
  1. {% if page-libs -%}
  2. {% capture libs-code -%}
  3. {% for lib in include.libs -%}
  4. {% if page-libs contains lib[0] -%}
  5. {% for file in lib[1] -%}
  6. <script src="{% if file contains 'http://' or file contains 'https://' %}{{ file | replace: 'GOOGLE_MAPS_KEY', google-maps-key }}{% else %}{{ page | relative }}/libs/{{ file }}{% if environment != 'development' %}?{{ 'now' | date: '%s' }}{% endif %}{% endif %}" defer></script>
  7. {% endfor -%}
  8. {% endif -%}
  9. {% endfor -%}
  10. {% endcapture -%}
  11. {% assign libs-code = libs-code | strip -%}
  12. {% if libs-code != "" -%}
  13. <!-- BEGIN PAGE LIBRARIES -->
  14. {{ libs-code }}
  15. <!-- END PAGE LIBRARIES -->
  16. {% endif -%}
  17. {% endif -%}