1# -*- coding: utf-8 -*-
2
3# Default settings
4project = 'Test Builds'
5extensions = [
6 'sphinx_autorun',
7 'sphinx_simplepdf',
8]
9
10latex_engine = 'xelatex' # allow us to build Unicode chars
11
12
13# Include all your settings here
14html_theme = 'sphinx_rtd_theme'
15html_static_path = ['_static']
16
17
18
19
20###########################################################################
21# auto-created readthedocs.org specific configuration #
22###########################################################################
23
24
25#
26# The following code was added during an automated build on readthedocs.org
27# It is auto created and injected for every build. The result is based on the
28# conf.py.tmpl file found in the readthedocs.org codebase:
29# https://github.com/rtfd/readthedocs.org/blob/main/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
30#
31# Note: this file shouldn't rely on extra dependencies.
32
33import importlib
34import sys
35import os.path
36
37# Borrowed from six.
38PY3 = sys.version_info[0] == 3
39string_types = str if PY3 else basestring
40
41from sphinx import version_info
42
43# Get suffix for proper linking to GitHub
44# This is deprecated in Sphinx 1.3+,
45# as each page can have its own suffix
46if globals().get('source_suffix', False):
47 if isinstance(source_suffix, string_types):
48 SUFFIX = source_suffix
49 elif isinstance(source_suffix, (list, tuple)):
50 # Sphinx >= 1.3 supports list/tuple to define multiple suffixes
51 SUFFIX = source_suffix[0]
52 elif isinstance(source_suffix, dict):
53 # Sphinx >= 1.8 supports a mapping dictionary for multiple suffixes
54 SUFFIX = list(source_suffix.keys())[0] # make a ``list()`` for py2/py3 compatibility
55 else:
56 # default to .rst
57 SUFFIX = '.rst'
58else:
59 SUFFIX = '.rst'
60
61# Add RTD Static Path. Add to the end because it overwrites previous files.
62if not 'html_static_path' in globals():
63 html_static_path = []
64if os.path.exists('_static'):
65 html_static_path.append('_static')
66
67# Add RTD Theme only if they aren't overriding it already
68using_rtd_theme = (
69 (
70 'html_theme' in globals() and
71 html_theme in ['default'] and
72 # Allow people to bail with a hack of having an html_style
73 'html_style' not in globals()
74 ) or 'html_theme' not in globals()
75)
76if using_rtd_theme:
77 html_theme = 'sphinx_rtd_theme'
78 html_style = None
79 html_theme_options = {}
80
81
82# This following legacy behavior will gradually be sliced out until its deprecated and removed.
83# Skipped for Sphinx 6+
84# Skipped by internal Feature flag SKIP_SPHINX_HTML_THEME_PATH
85# Skipped by all new projects since SKIP_SPHINX_HTML_THEME_PATH's introduction (jan 2023)
86if (
87 using_rtd_theme
88 and version_info < (6,0)
89 and not False
90 ):
91 theme = importlib.import_module('sphinx_rtd_theme')
92 if 'html_theme_path' in globals():
93 html_theme_path.append(theme.get_html_theme_path())
94 else:
95 html_theme_path = [theme.get_html_theme_path()]
96
97# Define websupport2_base_url and websupport2_static_url
98if globals().get('websupport2_base_url', False):
99 websupport2_base_url = 'https://readthedocs.org/websupport'
100 websupport2_static_url = 'https://assets.readthedocs.org/static/'
101
102
103#Add project information to the template context.
104context = {
105 'using_theme': using_rtd_theme,
106 'html_theme': html_theme,
107 'current_version': "all-formats-build-jobs",
108 'version_slug': "all-formats-build-jobs",
109 'MEDIA_URL': "https://media.readthedocs.org/",
110 'STATIC_URL': "https://assets.readthedocs.org/static/",
111 'PRODUCTION_DOMAIN': "readthedocs.org",
112 'proxied_static_path': "/_/static/",
113 'versions': [
114 ("latest", "/es/latest/"),
115 ("stable", "/es/stable/"),
116 ("5.0", "/es/5.0/"),
117 ("4.0", "/es/4.0/"),
118 ("wormhole", "/es/wormhole/"),
119 ("ubuntu-22.04", "/es/ubuntu-22.04/"),
120 ("ubuntu-20.04-python-3.9", "/es/ubuntu-20.04-python-3.9/"),
121 ("ubuntu-20.04", "/es/ubuntu-20.04/"),
122 ("theme-1.0rc1", "/es/theme-1.0rc1/"),
123 ("test-ubuntu-20.04", "/es/test-ubuntu-20.04/"),
124 ("test-rebased-commit", "/es/test-rebased-commit/"),
125 ("symlink-via-zipfile", "/es/symlink-via-zipfile/"),
126 ("sudo-commands", "/es/sudo-commands/"),
127 ("submodule-not-found", "/es/submodule-not-found/"),
128 ("staticrypt", "/es/staticrypt/"),
129 ("sphinx-tectonic-pdf", "/es/sphinx-tectonic-pdf/"),
130 ("sphinx-multipage-html", "/es/sphinx-multipage-html/"),
131 ("sphinx-mkdocstrings", "/es/sphinx-mkdocstrings/"),
132 ("sphinx-hoverxref", "/es/sphinx-hoverxref/"),
133 ("sphinx-fork", "/es/sphinx-fork/"),
134 ("sphinx-docs-zundler", "/es/sphinx-docs-zundler/"),
135 ("sphinx-conf-nonstandard", "/es/sphinx-conf-nonstandard/"),
136 ("sphinx-7.0.x", "/es/sphinx-7.0.x/"),
137 ("sphinx6.x-default", "/es/sphinx6.x-default/"),
138 ("sphinx5.x-default-confpy", "/es/sphinx5.x-default-confpy/"),
139 ("sphinx-5.x", "/es/sphinx-5.x/"),
140 ("sphinx-1.8", "/es/sphinx-1.8/"),
141 ("sphinx-1.7", "/es/sphinx-1.7/"),
142 ("sphinx-1.6", "/es/sphinx-1.6/"),
143 ("skip-build-command", "/es/skip-build-command/"),
144 ("singlehtml", "/es/singlehtml/"),
145 ("shot-scraper", "/es/shot-scraper/"),
146 ("search-special-chars", "/es/search-special-chars/"),
147 ("rust", "/es/rust/"),
148 ("rtd-sphinx-ext", "/es/rtd-sphinx-ext/"),
149 ("robots-txt", "/es/robots-txt/"),
150 ("regular-404-page", "/es/regular-404-page/"),
151 ("recommonmark", "/es/recommonmark/"),
152 ("readthedocs-docs-build-commands", "/es/readthedocs-docs-build-commands/"),
153 ("py3.11a", "/es/py3.11a/"),
154 ("py3.11", "/es/py3.11/"),
155 ("py3.10", "/es/py3.10/"),
156 ("pr-visual-diff", "/es/pr-visual-diff/"),
157 ("pr-test", "/es/pr-test/"),
158 ("pr-js-client", "/es/pr-js-client/"),
159 ("pr-homepage-edition", "/es/pr-homepage-edition/"),
160 ("poetry-asdf", "/es/poetry-asdf/"),
161 ("poetry", "/es/poetry/"),
162 ("pelican", "/es/pelican/"),
163 ("pdf-rinohtype", "/es/pdf-rinohtype/"),
164 ("pdf-cmd-fail", "/es/pdf-cmd-fail/"),
165 ("ooops-all-json", "/es/ooops-all-json/"),
166 ("old-output-directory", "/es/old-output-directory/"),
167 ("no-conf-py", "/es/no-conf-py/"),
168 ("no-config-file", "/es/no-config-file/"),
169 ("monorepo", "/es/monorepo/"),
170 ("mkdocs-pdf", "/es/mkdocs-pdf/"),
171 ("mkdocs-material", "/es/mkdocs-material/"),
172 ("mkdocs-htmlzip", "/es/mkdocs-htmlzip/"),
173 ("mkdocs-config-at-root", "/es/mkdocs-config-at-root/"),
174 ("mkdocs", "/es/mkdocs/"),
175 ("manual-integrations", "/es/manual-integrations/"),
176 ("manual-integration-docsify", "/es/manual-integration-docsify/"),
177 ("mamba", "/es/mamba/"),
178 ("main", "/es/main/"),
179 ("linkcheck", "/es/linkcheck/"),
180 ("jupyter-notebook", "/es/jupyter-notebook/"),
181 ("jupyter-book", "/es/jupyter-book/"),
182 ("jsdoc-autoapi", "/es/jsdoc-autoapi/"),
183 ("jsdoc", "/es/jsdoc/"),
184 ("invalid-docker-image", "/es/invalid-docker-image/"),
185 ("install-setuptools", "/es/install-setuptools/"),
186 ("image", "/es/image/"),
187 ("humitos-poetry", "/es/humitos-poetry/"),
188 ("git-submodules-invalid", "/es/git-submodules-invalid/"),
189 ("git-submodules", "/es/git-submodules/"),
190 ("git-lfs-build-jobs", "/es/git-lfs-build-jobs/"),
191 ("furo", "/es/furo/"),
192 ("expose-env-pip-error", "/es/expose-env-pip-error/"),
193 ("explicit-flyout-placement", "/es/explicit-flyout-placement/"),
194 ("expirement", "/es/expirement/"),
195 ("envvar-config-file", "/es/envvar-config-file/"),
196 ("docusaurus", "/es/docusaurus/"),
197 ("docsify-ads", "/es/docsify-ads/"),
198 ("docsify", "/es/docsify/"),
199 ("delete-sources", "/es/delete-sources/"),
200 ("d2lbook", "/es/d2lbook/"),
201 ("custom-404-page", "/es/custom-404-page/"),
202 ("csrf", "/es/csrf/"),
203 ("build-tools-update-2", "/es/build-tools-update-2/"),
204 ("build-tools-mamba", "/es/build-tools-mamba/"),
205 ("build-tools-conda", "/es/build-tools-conda/"),
206 ("build-tools", "/es/build-tools/"),
207 ("build-os-error-message", "/es/build-os-error-message/"),
208 ("build-latest-python-3.8", "/es/build-latest-python-3.8/"),
209 ("build-jobs-spaces-in-command", "/es/build-jobs-spaces-in-command/"),
210 ("build-jobs-post-build", "/es/build-jobs-post-build/"),
211 ("build-jobs-multiline", "/es/build-jobs-multiline/"),
212 ("build-jobs-diff-exit", "/es/build-jobs-diff-exit/"),
213 ("build-jobs", "/es/build-jobs/"),
214 ("build-commands-env-vars", "/es/build-commands-env-vars/"),
215 ("build-commands", "/es/build-commands/"),
216 ("bare-commands", "/es/bare-commands/"),
217 ("all-formats-build-jobs", "/es/all-formats-build-jobs/"),
218 ("all-formats-build-commands", "/es/all-formats-build-commands/"),
219 ("agj-test-pr", "/es/agj-test-pr/"),
220 ("agj-rtd-tf-example", "/es/agj-rtd-tf-example/"),
221 ],
222 'downloads': [
223 ],
224 'subprojects': [
225 ("stsewd-demo", "https://test.org.stsewd.dev/projects/stsewd-demo/en/custom-404-page/"),
226 ],
227 'slug': 'another-test-stsewd',
228 'name': u'another-test-stsewd',
229 'rtd_language': u'es',
230 'programming_language': u'words',
231 'canonical_url': 'https://test.org.stsewd.dev/es/latest/',
232 'analytics_code': 'None',
233 'single_version': False,
234 'conf_py_path': '/docs/',
235 'api_host': 'https://readthedocs.org',
236 'github_user': 'readthedocs',
237 'proxied_api_host': '/_',
238 'github_repo': 'test-builds',
239 'github_version': 'all-formats-build-jobs',
240 'display_github': True,
241 'bitbucket_user': 'None',
242 'bitbucket_repo': 'None',
243 'bitbucket_version': 'all-formats-build-jobs',
244 'display_bitbucket': False,
245 'gitlab_user': 'None',
246 'gitlab_repo': 'None',
247 'gitlab_version': 'all-formats-build-jobs',
248 'display_gitlab': False,
249 'READTHEDOCS': True,
250 'using_theme': (html_theme == "default"),
251 'new_theme': (html_theme == "sphinx_rtd_theme"),
252 'source_suffix': SUFFIX,
253 'ad_free': False,
254 'docsearch_disabled': False,
255 'user_analytics_code': '',
256 'global_analytics_code': 'UA-17997319-1',
257 'commit': '495cccdf',
258}
259
260# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
261# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
262if version_info >= (1, 8):
263 if not globals().get('html_baseurl'):
264 html_baseurl = context['canonical_url']
265 context['canonical_url'] = None
266
267
268
269
270
271if 'html_context' in globals():
272
273 html_context.update(context)
274
275else:
276 html_context = context
277
278# Add custom RTD extension
279if 'extensions' in globals():
280 # Insert at the beginning because it can interfere
281 # with other extensions.
282 # See https://github.com/rtfd/readthedocs.org/pull/4054
283 extensions.insert(0, "readthedocs_ext.readthedocs")
284else:
285 extensions = ["readthedocs_ext.readthedocs"]
286
287# Add External version warning banner to the external version documentation
288if 'branch' == 'external':
289 extensions.insert(1, "readthedocs_ext.external_version_warning")
290 readthedocs_vcs_url = 'None'
291 readthedocs_build_url = 'https://readthedocs.org/projects/another-test-stsewd/builds/20739979/'
292
293project_language = 'es'
294
295# User's Sphinx configurations
296language_user = globals().get('language', None)
297latex_engine_user = globals().get('latex_engine', None)
298latex_elements_user = globals().get('latex_elements', None)
299
300# Remove this once xindy gets installed in Docker image and XINDYOPS
301# env variable is supported
302# https://github.com/rtfd/readthedocs-docker-images/pull/98
303latex_use_xindy = False
304
305chinese = any([
306 language_user in ('zh_CN', 'zh_TW'),
307 project_language in ('zh_CN', 'zh_TW'),
308])
309
310japanese = any([
311 language_user == 'ja',
312 project_language == 'ja',
313])
314
315if chinese:
316 latex_engine = latex_engine_user or 'xelatex'
317
318 latex_elements_rtd = {
319 'preamble': '\\usepackage[UTF8]{ctex}\n',
320 }
321 latex_elements = latex_elements_user or latex_elements_rtd
322elif japanese:
323 latex_engine = latex_engine_user or 'platex'
324
325# Make sure our build directory is always excluded
326exclude_patterns = globals().get('exclude_patterns', [])
327exclude_patterns.extend(['_build'])