We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[fix] Sphinx 3.2.1 build: add missing "engines" variable in the jinja context
## What does this PR do?

Fix PR #2210 which upgrade Sphinx version to 3.2.1.

The admin/engines.html page is empty.

## Why is this change important?

Fix the admin/engines.html page.

## How to test this PR locally?

Check the admin/engines.html page.

## Author's checklist

<!-- additional notes for reviewiers -->

## Related issues

#2210


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 import  sys, os
4 from sphinx_build_tools import load_sphinx_config
5 from searx.version import VERSION_STRING
6 from pallets_sphinx_themes import ProjectLink
7 
8 from searx.brand import GIT_URL
9 GIT_BRANCH = os.environ.get("GIT_BRANCH", "master")
10 from searx.brand import SEARX_URL
11 from searx.brand import DOCS_URL
12 
13 
14 # Project --------------------------------------------------------------
15 
16 project = u'searx'
17 copyright = u'2015-2020, Adam Tauber, Noémi Ványi'
18 author = u'Adam Tauber'
19 release, version = VERSION_STRING, VERSION_STRING
20 highlight_language = 'none'
21 
22 # General --------------------------------------------------------------
23 
24 master_doc = "index"
25 source_suffix = '.rst'
26 numfig = True
27 
28 exclude_patterns = ['build-templates/*.rst']
29 
30 from searx import webapp
31 from searx.engines import engines
32 jinja_contexts = {
33     'webapp': dict(**webapp.__dict__),
34     'engines': engines
35 }
36 
37 # usage::   lorem :patch:`f373169` ipsum
38 extlinks = {}
39 
40 # upstream links
41 extlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ')
42 extlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ')
43 
44 # links to custom brand
45 extlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')
46 extlinks['patch'] = (GIT_URL + '/commit/%s', '#')
47 extlinks['search'] = (SEARX_URL + '/%s', '#')
48 extlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')
49 extlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')
50 extlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')
51 #extlinks['role'] = (
52 #    'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')
53 extlinks['duref'] = (
54     'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#%s', '')
55 extlinks['durole'] = (
56     'http://docutils.sourceforge.net/docs/ref/rst/roles.html#%s', '')
57 extlinks['dudir'] =  (
58     'http://docutils.sourceforge.net/docs/ref/rst/directives.html#%s', '')
59 extlinks['ctan'] =  (
60     'https://ctan.org/pkg/%s', 'CTAN: ')
61 
62 extensions = [
63     'sphinx.ext.imgmath',
64     'sphinx.ext.extlinks',
65     'sphinx.ext.viewcode',
66     "sphinx.ext.autodoc",
67     "sphinx.ext.intersphinx",
68     "pallets_sphinx_themes",
69     "sphinx_issues", # https://github.com/sloria/sphinx-issues/blob/master/README.rst
70     "sphinxcontrib.jinja",  # https://github.com/tardyp/sphinx-jinja
71     "sphinxcontrib.programoutput",  # https://github.com/NextThought/sphinxcontrib-programoutput
72     'linuxdoc.kernel_include',  # Implementation of the 'kernel-include' reST-directive.
73     'linuxdoc.rstFlatTable',    # Implementation of the 'flat-table' reST-directive.
74     'linuxdoc.kfigure',         # Sphinx extension which implements scalable image handling.
75     "sphinx_tabs.tabs", # https://github.com/djungelorm/sphinx-tabs
76 ]
77 
78 intersphinx_mapping = {
79     "python": ("https://docs.python.org/3/", None),
80     "flask": ("https://flask.palletsprojects.com/", None),
81     # "werkzeug": ("https://werkzeug.palletsprojects.com/", None),
82     "jinja": ("https://jinja.palletsprojects.com/", None),
83     "linuxdoc" : ("https://return42.github.io/linuxdoc/", None),
84     "sphinx" : ("https://www.sphinx-doc.org/en/master/", None),
85 }
86 
87 issues_github_path = "searx/searx"
88 
89 # HTML -----------------------------------------------------------------
90 
91 sys.path.append(os.path.abspath('_themes'))
92 html_theme_path = ['_themes']
93 html_theme = "searx"
94 
95 # sphinx.ext.imgmath setup
96 html_math_renderer = 'imgmath'
97 imgmath_image_format = 'svg'
98 imgmath_font_size = 14
99 # sphinx.ext.imgmath setup END
100 
101 html_theme_options = {"index_sidebar_logo": True}
102 html_context = {
103     "project_links": [
104         ProjectLink("Source", GIT_URL),
105         ProjectLink("Wiki", "https://github.com/searx/searx/wiki"),
106         ProjectLink("Public instances", "https://searx.space/"),
107         ProjectLink("Twitter", "https://twitter.com/Searx_engine"),
108     ]
109 }
110 html_sidebars = {
111     "**": ["project.html", "relations.html", "searchbox.html"],
112 }
113 singlehtml_sidebars = {"index": ["project.html", "localtoc.html"]}
114 html_static_path = ["static"]
115 html_logo = "static/img/searx_logo_small.png"
116 html_title = "Searx Documentation ({})".format("Searx-{}.tex".format(VERSION_STRING))
117 html_show_sourcelink = False
118 
119 # LaTeX ----------------------------------------------------------------
120 
121 latex_documents = [
122     (master_doc, "searx-{}.tex".format(VERSION_STRING), html_title, author, "manual")
123 ]
124 
125 # ------------------------------------------------------------------------------
126 # Since loadConfig overwrites settings from the global namespace, it has to be
127 # the last statement in the conf.py file
128 # ------------------------------------------------------------------------------
129 load_sphinx_config(globals())
130
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -28,10 +28,11 @@
 exclude_patterns = ['build-templates/*.rst']
 
 from searx import webapp
-from searx.engines import engines
+import searx.engines
+searx.engines.initialize_engines(searx.settings['engines'])
 jinja_contexts = {
     'webapp': dict(**webapp.__dict__),
-    'engines': engines
+    'engines': searx.engines.engines
 }
 
 # usage::   lorem :patch:`f373169` ipsum

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -28,10 +28,11 @@\n exclude_patterns = ['build-templates/*.rst']\n \n from searx import webapp\n-from searx.engines import engines\n+import searx.engines\n+searx.engines.initialize_engines(searx.settings['engines'])\n jinja_contexts = {\n     'webapp': dict(**webapp.__dict__),\n-    'engines': engines\n+    'engines': searx.engines.engines\n }\n \n # usage::   lorem :patch:`f373169` ipsum\n", "issue": "[fix] Sphinx 3.2.1 build: add missing \"engines\" variable in the jinja context\n## What does this PR do?\r\n\r\nFix PR #2210 which upgrade Sphinx version to 3.2.1.\r\n\r\nThe admin/engines.html page is empty.\r\n\r\n## Why is this change important?\r\n\r\nFix the admin/engines.html page.\r\n\r\n## How to test this PR locally?\r\n\r\nCheck the admin/engines.html page.\r\n\r\n## Author's checklist\r\n\r\n<!-- additional notes for reviewiers -->\r\n\r\n## Related issues\r\n\r\n#2210\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport  sys, os\nfrom sphinx_build_tools import load_sphinx_config\nfrom searx.version import VERSION_STRING\nfrom pallets_sphinx_themes import ProjectLink\n\nfrom searx.brand import GIT_URL\nGIT_BRANCH = os.environ.get(\"GIT_BRANCH\", \"master\")\nfrom searx.brand import SEARX_URL\nfrom searx.brand import DOCS_URL\n\n\n# Project --------------------------------------------------------------\n\nproject = u'searx'\ncopyright = u'2015-2020, Adam Tauber, No\u00e9mi V\u00e1nyi'\nauthor = u'Adam Tauber'\nrelease, version = VERSION_STRING, VERSION_STRING\nhighlight_language = 'none'\n\n# General --------------------------------------------------------------\n\nmaster_doc = \"index\"\nsource_suffix = '.rst'\nnumfig = True\n\nexclude_patterns = ['build-templates/*.rst']\n\nfrom searx import webapp\nfrom searx.engines import engines\njinja_contexts = {\n    'webapp': dict(**webapp.__dict__),\n    'engines': engines\n}\n\n# usage::   lorem :patch:`f373169` ipsum\nextlinks = {}\n\n# upstream links\nextlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ')\nextlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ')\n\n# links to custom brand\nextlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')\nextlinks['patch'] = (GIT_URL + '/commit/%s', '#')\nextlinks['search'] = (SEARX_URL + '/%s', '#')\nextlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')\nextlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')\nextlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')\n#extlinks['role'] = (\n#    'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')\nextlinks['duref'] = (\n    'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#%s', '')\nextlinks['durole'] = (\n    'http://docutils.sourceforge.net/docs/ref/rst/roles.html#%s', '')\nextlinks['dudir'] =  (\n    'http://docutils.sourceforge.net/docs/ref/rst/directives.html#%s', '')\nextlinks['ctan'] =  (\n    'https://ctan.org/pkg/%s', 'CTAN: ')\n\nextensions = [\n    'sphinx.ext.imgmath',\n    'sphinx.ext.extlinks',\n    'sphinx.ext.viewcode',\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.intersphinx\",\n    \"pallets_sphinx_themes\",\n    \"sphinx_issues\", # https://github.com/sloria/sphinx-issues/blob/master/README.rst\n    \"sphinxcontrib.jinja\",  # https://github.com/tardyp/sphinx-jinja\n    \"sphinxcontrib.programoutput\",  # https://github.com/NextThought/sphinxcontrib-programoutput\n    'linuxdoc.kernel_include',  # Implementation of the 'kernel-include' reST-directive.\n    'linuxdoc.rstFlatTable',    # Implementation of the 'flat-table' reST-directive.\n    'linuxdoc.kfigure',         # Sphinx extension which implements scalable image handling.\n    \"sphinx_tabs.tabs\", # https://github.com/djungelorm/sphinx-tabs\n]\n\nintersphinx_mapping = {\n    \"python\": (\"https://docs.python.org/3/\", None),\n    \"flask\": (\"https://flask.palletsprojects.com/\", None),\n    # \"werkzeug\": (\"https://werkzeug.palletsprojects.com/\", None),\n    \"jinja\": (\"https://jinja.palletsprojects.com/\", None),\n    \"linuxdoc\" : (\"https://return42.github.io/linuxdoc/\", None),\n    \"sphinx\" : (\"https://www.sphinx-doc.org/en/master/\", None),\n}\n\nissues_github_path = \"searx/searx\"\n\n# HTML -----------------------------------------------------------------\n\nsys.path.append(os.path.abspath('_themes'))\nhtml_theme_path = ['_themes']\nhtml_theme = \"searx\"\n\n# sphinx.ext.imgmath setup\nhtml_math_renderer = 'imgmath'\nimgmath_image_format = 'svg'\nimgmath_font_size = 14\n# sphinx.ext.imgmath setup END\n\nhtml_theme_options = {\"index_sidebar_logo\": True}\nhtml_context = {\n    \"project_links\": [\n        ProjectLink(\"Source\", GIT_URL),\n        ProjectLink(\"Wiki\", \"https://github.com/searx/searx/wiki\"),\n        ProjectLink(\"Public instances\", \"https://searx.space/\"),\n        ProjectLink(\"Twitter\", \"https://twitter.com/Searx_engine\"),\n    ]\n}\nhtml_sidebars = {\n    \"**\": [\"project.html\", \"relations.html\", \"searchbox.html\"],\n}\nsinglehtml_sidebars = {\"index\": [\"project.html\", \"localtoc.html\"]}\nhtml_static_path = [\"static\"]\nhtml_logo = \"static/img/searx_logo_small.png\"\nhtml_title = \"Searx Documentation ({})\".format(\"Searx-{}.tex\".format(VERSION_STRING))\nhtml_show_sourcelink = False\n\n# LaTeX ----------------------------------------------------------------\n\nlatex_documents = [\n    (master_doc, \"searx-{}.tex\".format(VERSION_STRING), html_title, author, \"manual\")\n]\n\n# ------------------------------------------------------------------------------\n# Since loadConfig overwrites settings from the global namespace, it has to be\n# the last statement in the conf.py file\n# ------------------------------------------------------------------------------\nload_sphinx_config(globals())\n", "path": "docs/conf.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\nimport  sys, os\nfrom sphinx_build_tools import load_sphinx_config\nfrom searx.version import VERSION_STRING\nfrom pallets_sphinx_themes import ProjectLink\n\nfrom searx.brand import GIT_URL\nGIT_BRANCH = os.environ.get(\"GIT_BRANCH\", \"master\")\nfrom searx.brand import SEARX_URL\nfrom searx.brand import DOCS_URL\n\n\n# Project --------------------------------------------------------------\n\nproject = u'searx'\ncopyright = u'2015-2020, Adam Tauber, No\u00e9mi V\u00e1nyi'\nauthor = u'Adam Tauber'\nrelease, version = VERSION_STRING, VERSION_STRING\nhighlight_language = 'none'\n\n# General --------------------------------------------------------------\n\nmaster_doc = \"index\"\nsource_suffix = '.rst'\nnumfig = True\n\nexclude_patterns = ['build-templates/*.rst']\n\nfrom searx import webapp\nimport searx.engines\nsearx.engines.initialize_engines(searx.settings['engines'])\njinja_contexts = {\n    'webapp': dict(**webapp.__dict__),\n    'engines': searx.engines.engines\n}\n\n# usage::   lorem :patch:`f373169` ipsum\nextlinks = {}\n\n# upstream links\nextlinks['wiki'] = ('https://github.com/searx/searx/wiki/%s', ' ')\nextlinks['pull'] = ('https://github.com/searx/searx/pull/%s', 'PR ')\n\n# links to custom brand\nextlinks['origin'] = (GIT_URL + '/blob/' + GIT_BRANCH + '/%s', 'git://')\nextlinks['patch'] = (GIT_URL + '/commit/%s', '#')\nextlinks['search'] = (SEARX_URL + '/%s', '#')\nextlinks['docs'] = (DOCS_URL + '/%s', 'docs: ')\nextlinks['pypi'] = ('https://pypi.org/project/%s', 'PyPi: ')\nextlinks['man'] = ('https://manpages.debian.org/jump?q=%s', '')\n#extlinks['role'] = (\n#    'https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-%s', '')\nextlinks['duref'] = (\n    'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#%s', '')\nextlinks['durole'] = (\n    'http://docutils.sourceforge.net/docs/ref/rst/roles.html#%s', '')\nextlinks['dudir'] =  (\n    'http://docutils.sourceforge.net/docs/ref/rst/directives.html#%s', '')\nextlinks['ctan'] =  (\n    'https://ctan.org/pkg/%s', 'CTAN: ')\n\nextensions = [\n    'sphinx.ext.imgmath',\n    'sphinx.ext.extlinks',\n    'sphinx.ext.viewcode',\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.intersphinx\",\n    \"pallets_sphinx_themes\",\n    \"sphinx_issues\", # https://github.com/sloria/sphinx-issues/blob/master/README.rst\n    \"sphinxcontrib.jinja\",  # https://github.com/tardyp/sphinx-jinja\n    \"sphinxcontrib.programoutput\",  # https://github.com/NextThought/sphinxcontrib-programoutput\n    'linuxdoc.kernel_include',  # Implementation of the 'kernel-include' reST-directive.\n    'linuxdoc.rstFlatTable',    # Implementation of the 'flat-table' reST-directive.\n    'linuxdoc.kfigure',         # Sphinx extension which implements scalable image handling.\n    \"sphinx_tabs.tabs\", # https://github.com/djungelorm/sphinx-tabs\n]\n\nintersphinx_mapping = {\n    \"python\": (\"https://docs.python.org/3/\", None),\n    \"flask\": (\"https://flask.palletsprojects.com/\", None),\n    # \"werkzeug\": (\"https://werkzeug.palletsprojects.com/\", None),\n    \"jinja\": (\"https://jinja.palletsprojects.com/\", None),\n    \"linuxdoc\" : (\"https://return42.github.io/linuxdoc/\", None),\n    \"sphinx\" : (\"https://www.sphinx-doc.org/en/master/\", None),\n}\n\nissues_github_path = \"searx/searx\"\n\n# HTML -----------------------------------------------------------------\n\nsys.path.append(os.path.abspath('_themes'))\nhtml_theme_path = ['_themes']\nhtml_theme = \"searx\"\n\n# sphinx.ext.imgmath setup\nhtml_math_renderer = 'imgmath'\nimgmath_image_format = 'svg'\nimgmath_font_size = 14\n# sphinx.ext.imgmath setup END\n\nhtml_theme_options = {\"index_sidebar_logo\": True}\nhtml_context = {\n    \"project_links\": [\n        ProjectLink(\"Source\", GIT_URL),\n        ProjectLink(\"Wiki\", \"https://github.com/searx/searx/wiki\"),\n        ProjectLink(\"Public instances\", \"https://searx.space/\"),\n        ProjectLink(\"Twitter\", \"https://twitter.com/Searx_engine\"),\n    ]\n}\nhtml_sidebars = {\n    \"**\": [\"project.html\", \"relations.html\", \"searchbox.html\"],\n}\nsinglehtml_sidebars = {\"index\": [\"project.html\", \"localtoc.html\"]}\nhtml_static_path = [\"static\"]\nhtml_logo = \"static/img/searx_logo_small.png\"\nhtml_title = \"Searx Documentation ({})\".format(\"Searx-{}.tex\".format(VERSION_STRING))\nhtml_show_sourcelink = False\n\n# LaTeX ----------------------------------------------------------------\n\nlatex_documents = [\n    (master_doc, \"searx-{}.tex\".format(VERSION_STRING), html_title, author, \"manual\")\n]\n\n# ------------------------------------------------------------------------------\n# Since loadConfig overwrites settings from the global namespace, it has to be\n# the last statement in the conf.py file\n# ------------------------------------------------------------------------------\nload_sphinx_config(globals())\n", "path": "docs/conf.py"}]}