We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Read The Docs documentation website search not working

You can test this link

https://docs.twisted.org/en/twisted-23.8.0/search.html?q=threads&check_keywords=yes&area=default#

it looks like jquery is not included


--- 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 #
2 # Twisted documentation build configuration file, created by
3 # sphinx-quickstart on Tue Jan 14 11:31:15 2014.
4 #
5 # This file is execfile()d with the current directory set to its
6 # containing dir.
7 #
8 # Note that not all possible configuration values are present in this
9 # autogenerated file.
10 #
11 # All configuration values have a default; values that are commented out
12 # serve to show the default.
13 
14 import os
15 import pathlib
16 import subprocess
17 import sys
18 from datetime import date
19 from pprint import pprint
20 
21 import sphinx_rtd_theme
22 
23 # If extensions (or modules to document with autodoc) are in another directory,
24 # add these directories to sys.path here. If the directory is relative to the
25 # documentation root, use os.path.abspath to make it absolute, like shown here.
26 sys.path.insert(0, os.path.abspath("./_extensions"))
27 sys.path.insert(0, os.path.abspath(".."))
28 
29 # -- General configuration ------------------------------------------------
30 
31 # See pyproject.toml for the Sphinx version required to build the documentation.
32 # needs_sphinx is not use to avoid duplication and getting these values
33 # out of sync.
34 
35 # Add any Sphinx extension module names here, as strings. They can be
36 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
37 # ones.
38 extensions = [
39     "sphinx.ext.intersphinx",
40     "pydoctor.sphinx_ext.build_apidocs",
41 ]
42 
43 try:
44     import rst2pdf.pdfbuilder
45 
46     extensions.append("rst2pdf.pdfbuilder")
47 except ImportError:
48     pass
49 
50 from twisted import version as twisted_version_object
51 
52 # Add any paths that contain templates here, relative to this directory.
53 templates_path = ["_templates"]
54 
55 # The suffix of source filenames.
56 source_suffix = ".rst"
57 
58 # The encoding of source files.
59 # source_encoding = 'utf-8-sig'
60 
61 # The master toctree document.
62 master_doc = "index"
63 
64 _today = date.today()
65 # General information about the project.
66 project = "Twisted"
67 copyright = "{}, Twisted Matrix Labs. Ver {}. Built on {}".format(
68     _today.year,
69     twisted_version_object.public(),
70     _today.isoformat(),
71 )
72 
73 # The version info for the project you're documenting, acts as replacement for
74 # |version| and |release|, also used in various other places throughout the
75 # built documents.
76 #
77 # The short X.Y version.
78 version = "{major}.{minor}".format(
79     major=twisted_version_object.major, minor=twisted_version_object.minor
80 )
81 # The full version, including alpha/beta/rc tags.
82 release = twisted_version_object.short()
83 
84 # There are two options for replacing |today|: either, you set today to some
85 # non-false value, then it is used:
86 # today = ''
87 # Else, today_fmt is used as the format for a strftime call.
88 # today_fmt = '%B %d, %Y'
89 
90 # List of patterns, relative to source directory, that match files and
91 # directories to ignore when looking for source files.
92 exclude_patterns = ["_build"]
93 
94 # The name of the Pygments (syntax highlighting) style to use.
95 pygments_style = "sphinx"
96 
97 # -- Options for HTML output ----------------------------------------------
98 
99 # Only the RTD theme is used. Both for local development and for the public site.
100 html_theme = "sphinx_rtd_theme"
101 html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
102 
103 # Add any paths that contain custom static files (such as style sheets) here,
104 # relative to this directory. They are copied after the builtin static files,
105 # so a file named "default.css" will overwrite the builtin "default.css".
106 html_static_path = ["_static"]
107 
108 
109 # These paths are either relative to html_static_path
110 # or fully qualified paths (eg. https://...)
111 html_js_files = [
112     "js/custom.js",
113     # Here we have a Sphinx HTML injection hack to make the JS script load without blocking.
114     'https://sidecar.gitter.im/dist/sidecar.v1.js" defer hack="',
115 ]
116 
117 # Output file base name for HTML help builder.
118 htmlhelp_basename = "Twisteddoc"
119 
120 
121 # -- Options for LaTeX output ---------------------------------------------
122 
123 latex_elements = {
124     # The paper size ('letterpaper' or 'a4paper').
125     #'papersize': 'letterpaper',
126     # The font size ('10pt', '11pt' or '12pt').
127     #'pointsize': '10pt',
128     # Additional stuff for the LaTeX preamble.
129     #'preamble': '',
130 }
131 
132 # Grouping the document tree into LaTeX files. List of tuples
133 # (source start file, target name, title,
134 #  author, documentclass [howto, manual, or own class]).
135 latex_documents = [
136     ("index", "Twisted.tex", "Twisted Documentation", "Twisted Matrix Labs", "manual"),
137 ]
138 
139 
140 # -- Options for manual page output ---------------------------------------
141 
142 # One entry per manual page. List of tuples
143 # (source start file, name, description, authors, manual section).
144 man_pages = [("index", "twisted", "Twisted Documentation", ["Twisted Matrix Labs"], 1)]
145 
146 
147 # -- Options for Texinfo output -------------------------------------------
148 
149 # Grouping the document tree into Texinfo files. List of tuples
150 # (source start file, target name, title, author,
151 #  dir menu entry, description, category)
152 texinfo_documents = [
153     (
154         "index",
155         "Twisted",
156         "Twisted Documentation",
157         "Twisted Matrix Labs",
158         "Twisted",
159         "One line description of project.",
160         "Miscellaneous",
161     ),
162 ]
163 
164 
165 # -- Options for Epub output ----------------------------------------------
166 
167 # Bibliographic Dublin Core info.
168 epub_title = "Twisted"
169 epub_author = "Twisted Matrix Labs"
170 epub_publisher = "Twisted Matrix Labs"
171 epub_copyright = "2020, Twisted Matrix Labs"
172 
173 
174 # -- Extension configuration ----------------------------------------------
175 _git_reference = subprocess.run(
176     ["git", "rev-parse", "--abbrev-ref", "HEAD"],
177     text=True,
178     encoding="utf8",
179     capture_output=True,
180     check=True,
181 ).stdout
182 
183 
184 print(f"== Environment dump for {_git_reference} ===")
185 pprint(dict(os.environ))
186 print("======")
187 
188 
189 # Try to find URL fragment for the GitHub source page based on current
190 # branch or tag.
191 
192 if _git_reference == "HEAD":
193     # It looks like the branch has no name.
194     # Fallback to commit ID.
195     _git_reference = subprocess.getoutput("git rev-parse HEAD")
196 
197 if os.environ.get("READTHEDOCS", "") == "True":
198     rtd_version = os.environ.get("READTHEDOCS_VERSION", "")
199     if "." in rtd_version:
200         # It looks like we have a tag build.
201         _git_reference = rtd_version
202 
203 _project_root = pathlib.Path(__file__).parent.parent
204 _source_root = _project_root / "src"
205 pydoctor_args = [
206     "--quiet",
207     # pydoctor should not fail the sphinx build, we have another tox environment for that.
208     f"--config={_project_root}/setup.cfg",
209     f"--html-viewsource-base=https://github.com/twisted/twisted/tree/{_git_reference}/src",
210     f"--project-base-dir={_source_root}",
211     f"--template-dir={_source_root}/twisted/python/_pydoctortemplates",
212     "--html-output={outdir}/api",
213     str(_source_root / "twisted"),
214 ]
215 
216 pydoctor_url_path = "/en/{rtd_version}/api/"
217 
218 # A dict mapping unique IDs (which can be used to disambiguate references) to a
219 # tuple of (<external sphinx documentation URI>, <inventory file location>).
220 # The inventory file may be None to use the default location at the given URI.
221 intersphinx_mapping = {
222     "py3": ("https://docs.python.org/3", None),
223     "zopeinterface": ("https://zopeinterface.readthedocs.io/en/latest", None),
224 }
225 # How long to cache remote inventories. Positive is a number of days,
226 # negative means infinite. The default is 5 days, which should be fine
227 # for standard library documentation that does not typically change
228 # significantly after release.
229 # intersphinx_cache_limit = 5
230
```
--- 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
@@ -20,6 +20,8 @@
 
 import sphinx_rtd_theme
 
+from twisted import version as twisted_version_object
+
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -37,18 +39,10 @@
 # ones.
 extensions = [
     "sphinx.ext.intersphinx",
+    "sphinxcontrib.jquery",
     "pydoctor.sphinx_ext.build_apidocs",
 ]
 
-try:
-    import rst2pdf.pdfbuilder
-
-    extensions.append("rst2pdf.pdfbuilder")
-except ImportError:
-    pass
-
-from twisted import version as twisted_version_object
-
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ["_templates"]
 
@@ -106,14 +100,6 @@
 html_static_path = ["_static"]
 
 
-# These paths are either relative to html_static_path
-# or fully qualified paths (eg. https://...)
-html_js_files = [
-    "js/custom.js",
-    # Here we have a Sphinx HTML injection hack to make the JS script load without blocking.
-    'https://sidecar.gitter.im/dist/sidecar.v1.js" defer hack="',
-]
-
 # Output file base name for HTML help builder.
 htmlhelp_basename = "Twisteddoc"

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -20,6 +20,8 @@\n \n import sphinx_rtd_theme\n \n+from twisted import version as twisted_version_object\n+\n # If extensions (or modules to document with autodoc) are in another directory,\n # add these directories to sys.path here. If the directory is relative to the\n # documentation root, use os.path.abspath to make it absolute, like shown here.\n@@ -37,18 +39,10 @@\n # ones.\n extensions = [\n     \"sphinx.ext.intersphinx\",\n+    \"sphinxcontrib.jquery\",\n     \"pydoctor.sphinx_ext.build_apidocs\",\n ]\n \n-try:\n-    import rst2pdf.pdfbuilder\n-\n-    extensions.append(\"rst2pdf.pdfbuilder\")\n-except ImportError:\n-    pass\n-\n-from twisted import version as twisted_version_object\n-\n # Add any paths that contain templates here, relative to this directory.\n templates_path = [\"_templates\"]\n \n@@ -106,14 +100,6 @@\n html_static_path = [\"_static\"]\n \n \n-# These paths are either relative to html_static_path\n-# or fully qualified paths (eg. https://...)\n-html_js_files = [\n-    \"js/custom.js\",\n-    # Here we have a Sphinx HTML injection hack to make the JS script load without blocking.\n-    'https://sidecar.gitter.im/dist/sidecar.v1.js\" defer hack=\"',\n-]\n-\n # Output file base name for HTML help builder.\n htmlhelp_basename = \"Twisteddoc\"\n", "issue": "Read The Docs documentation website search not working\n\r\nYou can test this link\r\n\r\nhttps://docs.twisted.org/en/twisted-23.8.0/search.html?q=threads&check_keywords=yes&area=default#\r\n\r\nit looks like jquery is not included\r\n\n", "before_files": [{"content": "#\n# Twisted documentation build configuration file, created by\n# sphinx-quickstart on Tue Jan 14 11:31:15 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport os\nimport pathlib\nimport subprocess\nimport sys\nfrom datetime import date\nfrom pprint import pprint\n\nimport sphinx_rtd_theme\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath(\"./_extensions\"))\nsys.path.insert(0, os.path.abspath(\"..\"))\n\n# -- General configuration ------------------------------------------------\n\n# See pyproject.toml for the Sphinx version required to build the documentation.\n# needs_sphinx is not use to avoid duplication and getting these values\n# out of sync.\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.intersphinx\",\n    \"pydoctor.sphinx_ext.build_apidocs\",\n]\n\ntry:\n    import rst2pdf.pdfbuilder\n\n    extensions.append(\"rst2pdf.pdfbuilder\")\nexcept ImportError:\n    pass\n\nfrom twisted import version as twisted_version_object\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix of source filenames.\nsource_suffix = \".rst\"\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n_today = date.today()\n# General information about the project.\nproject = \"Twisted\"\ncopyright = \"{}, Twisted Matrix Labs. Ver {}. Built on {}\".format(\n    _today.year,\n    twisted_version_object.public(),\n    _today.isoformat(),\n)\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = \"{major}.{minor}\".format(\n    major=twisted_version_object.major, minor=twisted_version_object.minor\n)\n# The full version, including alpha/beta/rc tags.\nrelease = twisted_version_object.short()\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = [\"_build\"]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# -- Options for HTML output ----------------------------------------------\n\n# Only the RTD theme is used. Both for local development and for the public site.\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n\n# These paths are either relative to html_static_path\n# or fully qualified paths (eg. https://...)\nhtml_js_files = [\n    \"js/custom.js\",\n    # Here we have a Sphinx HTML injection hack to make the JS script load without blocking.\n    'https://sidecar.gitter.im/dist/sidecar.v1.js\" defer hack=\"',\n]\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Twisteddoc\"\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #'papersize': 'letterpaper',\n    # The font size ('10pt', '11pt' or '12pt').\n    #'pointsize': '10pt',\n    # Additional stuff for the LaTeX preamble.\n    #'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (\"index\", \"Twisted.tex\", \"Twisted Documentation\", \"Twisted Matrix Labs\", \"manual\"),\n]\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(\"index\", \"twisted\", \"Twisted Documentation\", [\"Twisted Matrix Labs\"], 1)]\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        \"index\",\n        \"Twisted\",\n        \"Twisted Documentation\",\n        \"Twisted Matrix Labs\",\n        \"Twisted\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    ),\n]\n\n\n# -- Options for Epub output ----------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = \"Twisted\"\nepub_author = \"Twisted Matrix Labs\"\nepub_publisher = \"Twisted Matrix Labs\"\nepub_copyright = \"2020, Twisted Matrix Labs\"\n\n\n# -- Extension configuration ----------------------------------------------\n_git_reference = subprocess.run(\n    [\"git\", \"rev-parse\", \"--abbrev-ref\", \"HEAD\"],\n    text=True,\n    encoding=\"utf8\",\n    capture_output=True,\n    check=True,\n).stdout\n\n\nprint(f\"== Environment dump for {_git_reference} ===\")\npprint(dict(os.environ))\nprint(\"======\")\n\n\n# Try to find URL fragment for the GitHub source page based on current\n# branch or tag.\n\nif _git_reference == \"HEAD\":\n    # It looks like the branch has no name.\n    # Fallback to commit ID.\n    _git_reference = subprocess.getoutput(\"git rev-parse HEAD\")\n\nif os.environ.get(\"READTHEDOCS\", \"\") == \"True\":\n    rtd_version = os.environ.get(\"READTHEDOCS_VERSION\", \"\")\n    if \".\" in rtd_version:\n        # It looks like we have a tag build.\n        _git_reference = rtd_version\n\n_project_root = pathlib.Path(__file__).parent.parent\n_source_root = _project_root / \"src\"\npydoctor_args = [\n    \"--quiet\",\n    # pydoctor should not fail the sphinx build, we have another tox environment for that.\n    f\"--config={_project_root}/setup.cfg\",\n    f\"--html-viewsource-base=https://github.com/twisted/twisted/tree/{_git_reference}/src\",\n    f\"--project-base-dir={_source_root}\",\n    f\"--template-dir={_source_root}/twisted/python/_pydoctortemplates\",\n    \"--html-output={outdir}/api\",\n    str(_source_root / \"twisted\"),\n]\n\npydoctor_url_path = \"/en/{rtd_version}/api/\"\n\n# A dict mapping unique IDs (which can be used to disambiguate references) to a\n# tuple of (<external sphinx documentation URI>, <inventory file location>).\n# The inventory file may be None to use the default location at the given URI.\nintersphinx_mapping = {\n    \"py3\": (\"https://docs.python.org/3\", None),\n    \"zopeinterface\": (\"https://zopeinterface.readthedocs.io/en/latest\", None),\n}\n# How long to cache remote inventories. Positive is a number of days,\n# negative means infinite. The default is 5 days, which should be fine\n# for standard library documentation that does not typically change\n# significantly after release.\n# intersphinx_cache_limit = 5\n", "path": "docs/conf.py"}], "after_files": [{"content": "#\n# Twisted documentation build configuration file, created by\n# sphinx-quickstart on Tue Jan 14 11:31:15 2014.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\nimport os\nimport pathlib\nimport subprocess\nimport sys\nfrom datetime import date\nfrom pprint import pprint\n\nimport sphinx_rtd_theme\n\nfrom twisted import version as twisted_version_object\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath(\"./_extensions\"))\nsys.path.insert(0, os.path.abspath(\"..\"))\n\n# -- General configuration ------------------------------------------------\n\n# See pyproject.toml for the Sphinx version required to build the documentation.\n# needs_sphinx is not use to avoid duplication and getting these values\n# out of sync.\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.intersphinx\",\n    \"sphinxcontrib.jquery\",\n    \"pydoctor.sphinx_ext.build_apidocs\",\n]\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix of source filenames.\nsource_suffix = \".rst\"\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n_today = date.today()\n# General information about the project.\nproject = \"Twisted\"\ncopyright = \"{}, Twisted Matrix Labs. Ver {}. Built on {}\".format(\n    _today.year,\n    twisted_version_object.public(),\n    _today.isoformat(),\n)\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# The short X.Y version.\nversion = \"{major}.{minor}\".format(\n    major=twisted_version_object.major, minor=twisted_version_object.minor\n)\n# The full version, including alpha/beta/rc tags.\nrelease = twisted_version_object.short()\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = [\"_build\"]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# -- Options for HTML output ----------------------------------------------\n\n# Only the RTD theme is used. Both for local development and for the public site.\nhtml_theme = \"sphinx_rtd_theme\"\nhtml_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = [\"_static\"]\n\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"Twisteddoc\"\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #'papersize': 'letterpaper',\n    # The font size ('10pt', '11pt' or '12pt').\n    #'pointsize': '10pt',\n    # Additional stuff for the LaTeX preamble.\n    #'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (\"index\", \"Twisted.tex\", \"Twisted Documentation\", \"Twisted Matrix Labs\", \"manual\"),\n]\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [(\"index\", \"twisted\", \"Twisted Documentation\", [\"Twisted Matrix Labs\"], 1)]\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        \"index\",\n        \"Twisted\",\n        \"Twisted Documentation\",\n        \"Twisted Matrix Labs\",\n        \"Twisted\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    ),\n]\n\n\n# -- Options for Epub output ----------------------------------------------\n\n# Bibliographic Dublin Core info.\nepub_title = \"Twisted\"\nepub_author = \"Twisted Matrix Labs\"\nepub_publisher = \"Twisted Matrix Labs\"\nepub_copyright = \"2020, Twisted Matrix Labs\"\n\n\n# -- Extension configuration ----------------------------------------------\n_git_reference = subprocess.run(\n    [\"git\", \"rev-parse\", \"--abbrev-ref\", \"HEAD\"],\n    text=True,\n    encoding=\"utf8\",\n    capture_output=True,\n    check=True,\n).stdout\n\n\nprint(f\"== Environment dump for {_git_reference} ===\")\npprint(dict(os.environ))\nprint(\"======\")\n\n\n# Try to find URL fragment for the GitHub source page based on current\n# branch or tag.\n\nif _git_reference == \"HEAD\":\n    # It looks like the branch has no name.\n    # Fallback to commit ID.\n    _git_reference = subprocess.getoutput(\"git rev-parse HEAD\")\n\nif os.environ.get(\"READTHEDOCS\", \"\") == \"True\":\n    rtd_version = os.environ.get(\"READTHEDOCS_VERSION\", \"\")\n    if \".\" in rtd_version:\n        # It looks like we have a tag build.\n        _git_reference = rtd_version\n\n_project_root = pathlib.Path(__file__).parent.parent\n_source_root = _project_root / \"src\"\npydoctor_args = [\n    \"--quiet\",\n    # pydoctor should not fail the sphinx build, we have another tox environment for that.\n    f\"--config={_project_root}/setup.cfg\",\n    f\"--html-viewsource-base=https://github.com/twisted/twisted/tree/{_git_reference}/src\",\n    f\"--project-base-dir={_source_root}\",\n    f\"--template-dir={_source_root}/twisted/python/_pydoctortemplates\",\n    \"--html-output={outdir}/api\",\n    str(_source_root / \"twisted\"),\n]\n\npydoctor_url_path = \"/en/{rtd_version}/api/\"\n\n# A dict mapping unique IDs (which can be used to disambiguate references) to a\n# tuple of (<external sphinx documentation URI>, <inventory file location>).\n# The inventory file may be None to use the default location at the given URI.\nintersphinx_mapping = {\n    \"py3\": (\"https://docs.python.org/3\", None),\n    \"zopeinterface\": (\"https://zopeinterface.readthedocs.io/en/latest\", None),\n}\n# How long to cache remote inventories. Positive is a number of days,\n# negative means infinite. The default is 5 days, which should be fine\n# for standard library documentation that does not typically change\n# significantly after release.\n# intersphinx_cache_limit = 5\n", "path": "docs/conf.py"}]}