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.
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.
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 theStandaloneHTMLBuilder
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.