1project = 'Test Builds'
2extensions = [
3 'sphinx_autorun',
4 'sphinx_js',
5]
6
7js_source_path = '../src/'
8
9
10# Include all your settings here
11html_theme = 'sphinx_rtd_theme'
12
13
14
15
16###########################################################################
17# auto-created readthedocs.org specific configuration #
18###########################################################################
19
20
21#
22# The following code was added during an automated build on readthedocs.org
23# It is auto created and injected for every build. The result is based on the
24# conf.py.tmpl file found in the readthedocs.org codebase:
25# https://github.com/rtfd/readthedocs.org/blob/main/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
26#
27# Note: this file shouldn't rely on extra dependencies.
28
29import importlib
30import sys
31import os.path
32
33# Borrowed from six.
34PY3 = sys.version_info[0] == 3
35string_types = str if PY3 else basestring
36
37from sphinx import version_info
38
39# Get suffix for proper linking to GitHub
40# This is deprecated in Sphinx 1.3+,
41# as each page can have its own suffix
42if globals().get('source_suffix', False):
43 if isinstance(source_suffix, string_types):
44 SUFFIX = source_suffix
45 elif isinstance(source_suffix, (list, tuple)):
46 # Sphinx >= 1.3 supports list/tuple to define multiple suffixes
47 SUFFIX = source_suffix[0]
48 elif isinstance(source_suffix, dict):
49 # Sphinx >= 1.8 supports a mapping dictionary for multiple suffixes
50 SUFFIX = list(source_suffix.keys())[0] # make a ``list()`` for py2/py3 compatibility
51 else:
52 # default to .rst
53 SUFFIX = '.rst'
54else:
55 SUFFIX = '.rst'
56
57# Add RTD Static Path. Add to the end because it overwrites previous files.
58if not 'html_static_path' in globals():
59 html_static_path = []
60if os.path.exists('_static'):
61 html_static_path.append('_static')
62
63# Add RTD Theme only if they aren't overriding it already
64using_rtd_theme = (
65 (
66 'html_theme' in globals() and
67 html_theme in ['default'] and
68 # Allow people to bail with a hack of having an html_style
69 'html_style' not in globals()
70 ) or 'html_theme' not in globals()
71)
72if using_rtd_theme:
73 theme = importlib.import_module('sphinx_rtd_theme')
74 html_theme = 'sphinx_rtd_theme'
75 html_style = None
76 html_theme_options = {}
77 if 'html_theme_path' in globals():
78 html_theme_path.append(theme.get_html_theme_path())
79 else:
80 html_theme_path = [theme.get_html_theme_path()]
81
82if globals().get('websupport2_base_url', False):
83 websupport2_base_url = 'https://readthedocs.org/websupport'
84 websupport2_static_url = 'https://assets.readthedocs.org/static/'
85
86
87#Add project information to the template context.
88context = {
89 'using_theme': using_rtd_theme,
90 'html_theme': html_theme,
91 'current_version': "jsdoc",
92 'version_slug': "jsdoc",
93 'MEDIA_URL': "https://media.readthedocs.org/",
94 'STATIC_URL': "https://assets.readthedocs.org/static/",
95 'PRODUCTION_DOMAIN': "readthedocs.org",
96 'proxied_static_path': "/_/static/",
97 'versions': [
98 ("latest", "/en/latest/"),
99 ("4.0", "/en/4.0/"),
100 ("2.0", "/en/2.0/"),
101 ("yaml-v2", "/en/yaml-v2/"),
102 ("use-requirements-from-submodule", "/en/use-requirements-from-submodule/"),
103 ("use-py2", "/en/use-py2/"),
104 ("use-image-5.0rc1", "/en/use-image-5.0rc1/"),
105 ("use-apt", "/en/use-apt/"),
106 ("unicode-filename", "/en/unicode-filename/"),
107 ("d--branch", "/en/d--branch/"),
108 ("ubuntu-22.04", "/en/ubuntu-22.04/"),
109 ("typlog-theme", "/en/typlog-theme/"),
110 ("timetestlarge", "/en/timetestlarge/"),
111 ("timetest", "/en/timetest/"),
112 ("timeout", "/en/timeout/"),
113 ("throw-exception", "/en/throw-exception/"),
114 ("test-py-37", "/en/test-py-37/"),
115 ("test-pr-builder", "/en/test-pr-builder/"),
116 ("test-paths-with-spaces", "/en/test-paths-with-spaces/"),
117 ("testing-image", "/en/testing-image/"),
118 ("testing-activate-version", "/en/testing-activate-version/"),
119 ("test-code-injection-2", "/en/test-code-injection-2/"),
120 ("test-code-injection", "/en/test-code-injection/"),
121 ("test-agj-foo", "/en/test-agj-foo/"),
122 ("tag-v2", "/en/tag-v2/"),
123 ("tag-v1", "/en/tag-v1/"),
124 ("submodule-https-scheme", "/en/submodule-https-scheme/"),
125 ("submodule-git-scheme", "/en/submodule-git-scheme/"),
126 ("sphinx.yaml", "/en/sphinx.yaml/"),
127 ("sphinx-tabs", "/en/sphinx-tabs/"),
128 ("sphinx-latest", "/en/sphinx-latest/"),
129 ("sphinx-fork", "/en/sphinx-fork/"),
130 ("sphinx.ext.duration", "/en/sphinx.ext.duration/"),
131 ("sphinx-es-suggest", "/en/sphinx-es-suggest/"),
132 ("sphinx-3.x", "/en/sphinx-3.x/"),
133 ("sphinx2", "/en/sphinx2/"),
134 ("sphinx-1.8", "/en/sphinx-1.8/"),
135 ("sphinx-1.7", "/en/sphinx-1.7/"),
136 ("sphinx-1.6", "/en/sphinx-1.6/"),
137 ("search-with-old-sphinx-and-theme", "/en/search-with-old-sphinx-and-theme/"),
138 ("rust", "/en/rust/"),
139 ("run-rust", "/en/run-rust/"),
140 ("robots-txt", "/en/robots-txt/"),
141 ("requirements-not-found", "/en/requirements-not-found/"),
142 ("pypy3.5", "/en/pypy3.5/"),
143 ("pygments-custom-lexer-apex", "/en/pygments-custom-lexer-apex/"),
144 ("py3.9", "/en/py3.9/"),
145 ("py3.8", "/en/py3.8/"),
146 ("py3.5", "/en/py3.5/"),
147 ("py3.10", "/en/py3.10/"),
148 ("path-with-plus", "/en/path-with-plus/"),
149 ("no-config-file", "/en/no-config-file/"),
150 ("nbsphinx-3d-plot", "/en/nbsphinx-3d-plot/"),
151 ("multiple-source-suffix", "/en/multiple-source-suffix/"),
152 ("meta-tags", "/en/meta-tags/"),
153 ("mamba", "/en/mamba/"),
154 ("main", "/en/main/"),
155 ("jsdoc", "/en/jsdoc/"),
156 ("japanese-pdf", "/en/japanese-pdf/"),
157 ("invalid-submodules", "/en/invalid-submodules/"),
158 ("install-pytorch", "/en/install-pytorch/"),
159 ("install-aiohttp", "/en/install-aiohttp/"),
160 ("image", "/en/image/"),
161 ("huge-build-output", "/en/huge-build-output/"),
162 ("hide-me", "/en/hide-me/"),
163 ("git-lfs-build-jobs", "/en/git-lfs-build-jobs/"),
164 ("git-lfs", "/en/git-lfs/"),
165 ("file-with-apostrophe", "/en/file-with-apostrophe/"),
166 ("expose-env-pip-error", "/en/expose-env-pip-error/"),
167 ("environment-variables", "/en/environment-variables/"),
168 ("datetime", "/en/datetime/"),
169 ("custom-404-page", "/en/custom-404-page/"),
170 ("conda-satisfied-skip-solve", "/en/conda-satisfied-skip-solve/"),
171 ("conda-pin-common-deps", "/en/conda-pin-common-deps/"),
172 ("conda-env-py3.7", "/en/conda-env-py3.7/"),
173 ("conda-env-no-py-pinned", "/en/conda-env-no-py-pinned/"),
174 ("conda-env", "/en/conda-env/"),
175 ("code-injection-3", "/en/code-injection-3/"),
176 ("c-dependencies", "/en/c-dependencies/"),
177 ("build-tools-mamba", "/en/build-tools-mamba/"),
178 ("build-tools-conda", "/en/build-tools-conda/"),
179 ("build-tools", "/en/build-tools/"),
180 ("build-os-error-message", "/en/build-os-error-message/"),
181 ("build-jobs-multiline", "/en/build-jobs-multiline/"),
182 ("build-jobs", "/en/build-jobs/"),
183 ("build-internals", "/en/build-internals/"),
184 ("build-commands", "/en/build-commands/"),
185 ("be-default", "/en/be-default/"),
186 ("another-matching-branch", "/en/another-matching-branch/"),
187 ("annotated-tag", "/en/annotated-tag/"),
188 ("all-formats", "/en/all-formats/"),
189 ("alabaster-theme", "/en/alabaster-theme/"),
190 ("agj-test-pr", "/en/agj-test-pr/"),
191 ("agj-rtd-tf-example", "/en/agj-rtd-tf-example/"),
192 ],
193 'downloads': [
194 ],
195 'subprojects': [
196 ],
197 'slug': 'test-builds',
198 'name': u'test-builds',
199 'rtd_language': u'en',
200 'programming_language': u'words',
201 'canonical_url': 'https://test-builds.readthedocs.io/en/latest/',
202 'analytics_code': 'UA-12341234-1',
203 'single_version': False,
204 'conf_py_path': '/docs/',
205 'api_host': 'https://readthedocs.org',
206 'github_user': 'readthedocs',
207 'proxied_api_host': '/_',
208 'github_repo': 'test-builds',
209 'github_version': 'jsdoc',
210 'display_github': True,
211 'bitbucket_user': 'None',
212 'bitbucket_repo': 'None',
213 'bitbucket_version': 'jsdoc',
214 'display_bitbucket': False,
215 'gitlab_user': 'None',
216 'gitlab_repo': 'None',
217 'gitlab_version': 'jsdoc',
218 'display_gitlab': False,
219 'READTHEDOCS': True,
220 'using_theme': (html_theme == "default"),
221 'new_theme': (html_theme == "sphinx_rtd_theme"),
222 'source_suffix': SUFFIX,
223 'ad_free': False,
224 'docsearch_disabled': False,
225 'user_analytics_code': 'UA-12341234-1',
226 'global_analytics_code': None,
227 'commit': '471f4a54',
228}
229
230# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
231# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
232if version_info >= (1, 8):
233 if not globals().get('html_baseurl'):
234 html_baseurl = context['canonical_url']
235 context['canonical_url'] = None
236
237
238
239
240
241if 'html_context' in globals():
242
243 html_context.update(context)
244
245else:
246 html_context = context
247
248# Add custom RTD extension
249if 'extensions' in globals():
250 # Insert at the beginning because it can interfere
251 # with other extensions.
252 # See https://github.com/rtfd/readthedocs.org/pull/4054
253 extensions.insert(0, "readthedocs_ext.readthedocs")
254else:
255 extensions = ["readthedocs_ext.readthedocs"]
256
257# Add External version warning banner to the external version documentation
258if 'branch' == 'external':
259 extensions.insert(1, "readthedocs_ext.external_version_warning")
260 readthedocs_vcs_url = 'None'
261 readthedocs_build_url = 'https://readthedocs.org/projects/test-builds/builds/16946422/'
262
263project_language = 'en'
264
265# User's Sphinx configurations
266language_user = globals().get('language', None)
267latex_engine_user = globals().get('latex_engine', None)
268latex_elements_user = globals().get('latex_elements', None)
269
270# Remove this once xindy gets installed in Docker image and XINDYOPS
271# env variable is supported
272# https://github.com/rtfd/readthedocs-docker-images/pull/98
273latex_use_xindy = False
274
275chinese = any([
276 language_user in ('zh_CN', 'zh_TW'),
277 project_language in ('zh_CN', 'zh_TW'),
278])
279
280japanese = any([
281 language_user == 'ja',
282 project_language == 'ja',
283])
284
285if chinese:
286 latex_engine = latex_engine_user or 'xelatex'
287
288 latex_elements_rtd = {
289 'preamble': '\\usepackage[UTF8]{ctex}\n',
290 }
291 latex_elements = latex_elements_user or latex_elements_rtd
292elif japanese:
293 latex_engine = latex_engine_user or 'platex'
294
295# Make sure our build directory is always excluded
296exclude_patterns = globals().get('exclude_patterns', [])
297exclude_patterns.extend(['_build'])