You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
... the documentation does not mention anything about my problem
... the problem doesn't occur with the default MkDocs template
... the problem is not in any of my customizations (CSS, JS, template)
... there are no open or closed issues that are related to my problem
Description
The service worker of the "search" plugin is executed even if the plugin is disabled using plugins: [] in the configuration. Thus, the service worker requests a none existing /search/search_index.json and a 404 is retured by the web server.
Expected behavior
The service worker isn't initialized if set plugins: [] in the configuration.
Actual behavior
Initialization is done unconditionally in the base.html file of the theme.
Steps to reproduce the bug
Set plugins: [] in the configuration
Open the docs in the browser
In the browser console, an error about the missing search/search_index.json file is logged
Thanks for reporting! That's indeed a bug. Thanks for providing a possible solution. Unfortunately, this will disable all other JavaScript-based features of the theme, but I'll look into it.
I checked that...
Description
The service worker of the "search" plugin is executed even if the plugin is disabled using
plugins: []
in the configuration. Thus, the service worker requests a none existing/search/search_index.json
and a 404 is retured by the web server.Expected behavior
The service worker isn't initialized if set
plugins: []
in the configuration.Actual behavior
Initialization is done unconditionally in the
base.html
file of the theme.Steps to reproduce the bug
plugins: []
in the configurationsearch/search_index.json
file is loggedPackage versions
Python 3.6.9
mkdocs, version 1.1.2
Version: 4.5.0
Project configuration
Possible solution
Check if search plugin is enabled in
base.html
:The text was updated successfully, but these errors were encountered: