diff options
| author | eugenesvk | 2023-05-02 23:21:27 +0700 |
|---|---|---|
| committer | Jieiku | 2023-05-22 22:51:20 -0700 |
| commit | 7b9c68a26e662a5a23ac23a192255d1aa691bea5 (patch) | |
| tree | 40534b907703ed4c6be62b272179e9d1ee3979a6 | |
| parent | 6c5915c04659a992635742074b2ad92d3e97a9df (diff) | |
| download | abridge-7b9c68a26e662a5a23ac23a192255d1aa691bea5.tar.gz abridge-7b9c68a26e662a5a23ac23a192255d1aa691bea5.tar.bz2 abridge-7b9c68a26e662a5a23ac23a192255d1aa691bea5.zip | |
Allow disabling search library
if config search_library is set to false, it should stop loading search scripts
| -rw-r--r-- | templates/macros/head.html | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/macros/head.html b/templates/macros/head.html index 88c9781..648d170 100644 --- a/templates/macros/head.html +++ b/templates/macros/head.html @@ -113,6 +113,7 @@ <script defer src="{{ get_url(path=js_codecopy, trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path=js_codecopy, sha_type=384, base64=true) | safe }}"{%- endif %}></script> {%- 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" %} @@ -127,6 +128,7 @@ {%- endif %} {%- endif %} + {%- endif %} {%- endif %} |
