sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.42k stars 2.1k forks source link

Option to choose searchindex.js location #11153

Open dagnic opened 1 year ago

dagnic commented 1 year ago

When using sphinx within a flask application, all files in the _static directory are accessible. That's not the case by default for the files outside _static, unless we define specific routes.

I propose to add an option searchindex_filename to the StandaloneHTMLBuilder to be able to choose a specific location for the searchindex.js file.

EDIT: this is may be difficult since many themes (including provided by extensions) rely on the assumption that this file is in the root of the build directory.

AA-Turner commented 1 month ago

I've seen @jayaddison's #12692, but I am not entirely sure of the value proposition of this change. Could we expand on why it is useful to move searchindex.js? I'm not sure I understand the flask example.

A