diff options
| author | Jieiku | 2023-05-22 22:37:44 -0700 |
|---|---|---|
| committer | Jieiku | 2023-05-22 22:37:44 -0700 |
| commit | 6dcec618d0ff0a2270f787f62267a0622275c69d (patch) | |
| tree | f0dd674fe43331db55ddae38808749de0323f030 /templates/macros | |
| parent | 71d977d49afbf93e0c736815e36d59664991fa18 (diff) | |
| download | abridge-6dcec618d0ff0a2270f787f62267a0622275c69d.tar.gz abridge-6dcec618d0ff0a2270f787f62267a0622275c69d.tar.bz2 abridge-6dcec618d0ff0a2270f787f62267a0622275c69d.zip | |
Load Tinysearch/Stork On Demand
Diffstat (limited to 'templates/macros')
| -rw-r--r-- | templates/macros/create_tinysearch_json.html | 2 | ||||
| -rw-r--r-- | templates/macros/head.html | 44 |
2 files changed, 3 insertions, 43 deletions
diff --git a/templates/macros/create_tinysearch_json.html b/templates/macros/create_tinysearch_json.html index a28d9dc..0e6ece4 100644 --- a/templates/macros/create_tinysearch_json.html +++ b/templates/macros/create_tinysearch_json.html @@ -24,4 +24,4 @@ {{ self::from_section(section=subsection) }} {%- endfor -%} {%- endif -%}{%- endif -%} -{%- endmacro from_section -%}
\ No newline at end of file +{%- endmacro from_section -%} diff --git a/templates/macros/head.html b/templates/macros/head.html index 3767a16..8da09cb 100644 --- a/templates/macros/head.html +++ b/templates/macros/head.html @@ -56,19 +56,6 @@ - - - - - - - - - - - - - {%- macro js(config) %} {%- set search_library=config.extra.search_library | default(value="elasticlunr") -%} @@ -129,7 +116,7 @@ {%- 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='stork.js', trailing_slash=false, cachebust=true) | safe }}"{%- if config.extra.integrity | default(value=true) %} integrity="sha384-{{ get_hash(path='stork.js', sha_type=384, base64=true) | safe }}"{%- endif %}></script> + <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> @@ -166,7 +153,7 @@ {%- endif %}{%- endif %} {%- if config.extra.math_auto_render or page.extra.math_auto_render %} - {%- set katex_autorender_js=config.extra.katex_autorender_js | default(value="auto-render.min.js") -%} + {%- set katex_autorender_js=config.extra.katex_autorender_js | default(value="katex-auto-render.min.js") -%} {%- if katex_autorender_js %} {%- if katex_autorender_js is matching("^http[s]?://") %} <script defer src="{{ katex_autorender_js | safe }}"{%- if config.extra.integrity | default(value=true) and config.extra.katex_autorender_js_integrity %} integrity="{{ config.extra.katex_autorender_js_integrity | safe }}"{%- endif %} crossorigin="anonymous"></script> @@ -187,33 +174,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - {%- macro favicons(config) %} {%- if config.extra.favicon_theme_color %} <meta name="theme-color" content="{{ config.extra.favicon_theme_color }}" /> |
