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