Fixed lunr.js import scripts

This commit is contained in:
Waldinar Oliveira Neto 2018-08-06 04:37:43 -03:00 committed by Martin Donath
parent a534c93e68
commit cc46c9e5fb

View File

@ -329,20 +329,20 @@
{% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %}
{% set path = "assets/javascripts/lunr/" %}
<script src="{{ path ~ 'lunr.stemmer.support.js' | url }}"></script>
<script src="{{ (path ~ 'lunr.stemmer.support.js') | url }}"></script>
{% for language in languages | map("trim") %}
{% if language != "en" %}
{% if language == "jp" %}
<script src="{{ path ~ 'tinyseg.js' | url }}"></script>
<script src="{{ (path ~ 'tinyseg.js') | url }}"></script>
{% endif %}
{% if language in ($md-lunr-languages$) %}
<script src="{{ path ~ 'lunr.' ~ language ~ '.js' | url }}">
<script src="{{ (path ~ 'lunr.' ~ language ~ '.js') | url }}">
</script>
{% endif %}
{% endif %}
{% endfor %}
{% if languages | length > 1 %}
<script src="{{ path ~ 'lunr.multi.js' | url }}"></script>
<script src="{{ (path ~ 'lunr.multi.js') | url }}"></script>
{% endif %}
{% endif %}
{% endif %}