From e62e7bb6b14555c9bbe5d40d217103984f4f80e6 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 27 Oct 2019 09:57:37 -0400 Subject: Rewrite progress --- _includes/scripts.html | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 _includes/scripts.html (limited to '_includes/scripts.html') diff --git a/_includes/scripts.html b/_includes/scripts.html new file mode 100644 index 0000000..5530028 --- /dev/null +++ b/_includes/scripts.html @@ -0,0 +1,39 @@ +{% if site.footer_scripts %} + {% for script in site.footer_scripts %} + {% if script contains "://" %} + {% capture script_path %}{{ script }}{% endcapture %} + {% else %} + {% capture script_path %}{{ script | relative_url }}{% endcapture %} + {% endif %} + + {% endfor %} +{% else %} + + +{% endif %} + +{% if site.search == true or page.layout == "search" %} + {%- assign search_provider = site.search_provider | default: "lunr" -%} + {%- case search_provider -%} + {%- when "lunr" -%} + {% include_cached search/lunr-search-scripts.html %} + {%- when "google" -%} + {% include_cached search/google-search-scripts.html %} + {%- when "algolia" -%} + {% include_cached search/algolia-search-scripts.html %} + {%- endcase -%} +{% endif %} + +{% 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 %} + + {% endfor %} +{% endif %} -- cgit v1.2.3