Allow adding JavaScript files after the theme's (#2116)

Allow adding JavaScript files after those bundled in the theme

Close #2110
This commit is contained in:
Michael Rose
2019-04-08 21:03:52 -04:00
committed by GitHub
parent e4c0689cda
commit df8a030a42
2 changed files with 14 additions and 1 deletions

View File

@ -26,3 +26,14 @@
{% include analytics.html %}
{% include /comments-providers/scripts.html %}
{% if site.after_footer_scripts %}
{% for script in site.after_footer_scripts %}
{% if script contains "://" %}
{% capture script_path %}{{ script }}{% endcapture %}
{% else %}
{% capture script_path %}{{ script | relative_url }}{% endcapture %}
{% endif %}
<script src="{{ script_path }}"></script>
{% endfor %}
{% endif %}