hacks-guide-minimal-mistake.../_includes/scripts.html
Nick Garlis cc3b21bc86 Add Lunr Search (#1353)
* Add `search.html` layout and JavaScript
* Move `{{ content }}` before search input
* Add spaces for consistency

Close #1011
2017-11-15 14:43:31 -05:00

20 lines
694 B
HTML

{% if site.footer_scripts %}
{% for script in site.footer_scripts %}
{% if script contains "://" %}
{% capture script_path %}{{ script }}{% endcapture %}
{% else %}
{% capture script_path %}{{ script | absolute_url }}{% endcapture %}
{% endif %}
<script src="{{ script_path }}"></script>
{% endfor %}
{% else %}
<script src="{{ '/assets/js/main.min.js' | absolute_url }}"></script>
{% endif %}
{% if page.layout == 'search' %}
<script src="{{ '/assets/js/lunr.min.js' | absolute_url }}"></script>
<script src="{{ '/assets/js/lunr-en.js' | absolute_url }}"></script>
{% endif %}
{% include analytics.html %}
{% include /comments-providers/scripts.html %}