Fixed path concatenation in templates

This commit is contained in:
squidfunk 2018-08-04 20:22:49 +02:00
parent d7a32d0a84
commit 159575bbe9
2 changed files with 8 additions and 8 deletions

View File

@ -182,19 +182,19 @@
{% set languages = lang.t("search.language").split(",") %} {% set languages = lang.t("search.language").split(",") %}
{% if languages | length and languages[0] != "" %} {% if languages | length and languages[0] != "" %}
{% set path = "/assets/javascripts/lunr/" %} {% 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") %} {% for language in languages | map("trim") %}
{% if language != "en" %} {% if language != "en" %}
{% if language == "jp" %} {% if language == "jp" %}
<script src="{{ path + 'tinyseg.js' | url }}"></script> <script src="{{ path ~ 'tinyseg.js' | url }}"></script>
{% endif %} {% endif %}
{% if language in ("da", "de", "du", "es", "fi", "fr", "hu", "it", "jp", "no", "pt", "ro", "ru", "sv", "tr") %} {% if language in ("da", "de", "du", "es", "fi", "fr", "hu", "it", "jp", "no", "pt", "ro", "ru", "sv", "tr") %}
<script src="{{ path + 'lunr.' + language + '.js' | url }}"></script> <script src="{{ path ~ 'lunr.' ~ language ~ '.js' | url }}"></script>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if languages | length > 1 %} {% if languages | length > 1 %}
<script src="{{ path + 'lunr.multi.js' | url }}"></script> <script src="{{ path ~ 'lunr.multi.js' | url }}"></script>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endif %} {% endif %}

View File

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