mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-30 18:24:35 +01:00
Fixed search worker override not being respected
This commit is contained in:
parent
2d411a2b41
commit
441381b7af
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -223,7 +223,7 @@
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% block scripts %}
|
||||
<script src="{{ 'assets/javascripts/bundle.56a63758.min.js' | url }}"></script>
|
||||
<script src="{{ 'assets/javascripts/bundle.756773cc.min.js' | url }}"></script>
|
||||
{% for path in config["extra_javascript"] %}
|
||||
<script src="{{ path | url }}"></script>
|
||||
{% endfor %}
|
||||
|
@ -95,7 +95,8 @@ export function mountSearch(
|
||||
): Observable<Component<Search>> {
|
||||
const config = configuration()
|
||||
try {
|
||||
const worker = setupSearchWorker(config.search, index$)
|
||||
const url = __search?.worker || config.search
|
||||
const worker = setupSearchWorker(url, index$)
|
||||
|
||||
/* Retrieve query and result components */
|
||||
const query = getComponentElement("search-query", el)
|
||||
|
1
typings/_/index.d.ts
vendored
1
typings/_/index.d.ts
vendored
@ -39,6 +39,7 @@ import {
|
||||
export interface GlobalSearchConfig {
|
||||
transform?: SearchTransformFn /* Transformation function */
|
||||
index?: Promise<SearchIndex> /* Alternate index */
|
||||
worker?: string /* Alternate worker URL */
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user