aboutsummaryrefslogtreecommitdiff
path: root/templates/macros/head.html
diff options
context:
space:
mode:
authoreugenesvk2023-05-02 23:27:11 +0700
committerJieiku2023-05-22 22:51:37 -0700
commit0c01c0119e2179a074ced4dfed831b1df67441ca (patch)
tree05c2a653fc189ac90f6e3fc9eda660ee4f4da2cd /templates/macros/head.html
parent7b9c68a26e662a5a23ac23a192255d1aa691bea5 (diff)
downloadabridge-0c01c0119e2179a074ced4dfed831b1df67441ca.tar.gz
abridge-0c01c0119e2179a074ced4dfed831b1df67441ca.tar.bz2
abridge-0c01c0119e2179a074ced4dfed831b1df67441ca.zip
Align search code vertically
Diffstat (limited to 'templates/macros/head.html')
-rw-r--r--templates/macros/head.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/templates/macros/head.html b/templates/macros/head.html
index 648d170..8aa2128 100644
--- a/templates/macros/head.html
+++ b/templates/macros/head.html
@@ -114,17 +114,17 @@
{%- endif %}
{%- if config.build_search_index %}
- {%- if search_library == "tinysearch" %}
- <script defer type="module" src="{{ get_url(path='tinysearch.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='tinysearch.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif search_library == "stork" %}
- <script defer type="module" src="{{ get_url(path='search_stork.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='search_stork.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- else %}
- <script defer src="{{ get_url(path='elasticlunr.min.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='elasticlunr.min.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- <script defer src="{{ get_url(path='search.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='search.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- if search_library == "tinysearch" %}
+ <script defer type="module" src="{{ get_url(path='tinysearch.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='tinysearch.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- elif search_library == "stork" %}
+ <script defer type="module" src="{{ get_url(path='search_stork.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='search_stork.min.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ {%- else %}
+ <script defer src="{{ get_url(path='elasticlunr.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='elasticlunr.min.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path='search.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='search.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- if lang != "en" %}
- <script defer src="{{ get_url(path='lunr.stemmer.support.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='lunr.stemmer.support.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- <script defer src="{{ get_url(path='lunr.' ~ lang ~ '.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='lunr.' ~ lang ~ '.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path='lunr.stemmer.support.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='lunr.stemmer.support.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script>
+ <script defer src="{{ get_url(path='lunr.' ~ lang ~ '.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='lunr.' ~ lang ~ '.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- endif %}
{%- endif %}