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': "ubuntu-22.04-python3.6",
74 'version_slug': "ubuntu-22.04-python3.6",
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-auto-cancel", "/es/test-auto-cancel/"),
98 ("template-config-file", "/es/template-config-file/"),
99 ("symlink-via-zipfile", "/es/symlink-via-zipfile/"),
100 ("sudo-commands", "/es/sudo-commands/"),
101 ("submodule-not-found", "/es/submodule-not-found/"),
102 ("staticrypt", "/es/staticrypt/"),
103 ("sphinx-tectonic-pdf", "/es/sphinx-tectonic-pdf/"),
104 ("sphinx-multipage-html", "/es/sphinx-multipage-html/"),
105 ("sphinx-mkdocstrings", "/es/sphinx-mkdocstrings/"),
106 ("sphinx-hoverxref", "/es/sphinx-hoverxref/"),
107 ("sphinx-fork", "/es/sphinx-fork/"),
108 ("sphinx-docs-zundler", "/es/sphinx-docs-zundler/"),
109 ("sphinx-conf-nonstandard", "/es/sphinx-conf-nonstandard/"),
110 ("sphinx-awesome", "/es/sphinx-awesome/"),
111 ("sphinx-7.0.x", "/es/sphinx-7.0.x/"),
112 ("sphinx6.x-default", "/es/sphinx6.x-default/"),
113 ("sphinx5.x-default-confpy", "/es/sphinx5.x-default-confpy/"),
114 ("sphinx-5.x", "/es/sphinx-5.x/"),
115 ("sphinx-1.8", "/es/sphinx-1.8/"),
116 ("sphinx-1.7", "/es/sphinx-1.7/"),
117 ("sphinx-1.6", "/es/sphinx-1.6/"),
118 ("skip-build-command-pr-test3", "/es/skip-build-command-pr-test3/"),
119 ("skip-build-command-pr-test2", "/es/skip-build-command-pr-test2/"),
120 ("skip-build-command-pr-test", "/es/skip-build-command-pr-test/"),
121 ("skip-build-command", "/es/skip-build-command/"),
122 ("singlehtml", "/es/singlehtml/"),
123 ("shot-scraper", "/es/shot-scraper/"),
124 ("search-special-chars", "/es/search-special-chars/"),
125 ("rust-1.70", "/es/rust-1.70/"),
126 ("rust", "/es/rust/"),
127 ("rtd-sphinx-ext", "/es/rtd-sphinx-ext/"),
128 ("robots-txt", "/es/robots-txt/"),
129 ("regular-404-page", "/es/regular-404-page/"),
130 ("recommonmark", "/es/recommonmark/"),
131 ("readthedocs-docs-build-commands", "/es/readthedocs-docs-build-commands/"),
132 ("python-system-packages", "/es/python-system-packages/"),
133 ("python-setuptools-package", "/es/python-setuptools-package/"),
134 ("py3.11a", "/es/py3.11a/"),
135 ("py3.11", "/es/py3.11/"),
136 ("py3.10", "/es/py3.10/"),
137 ("pr-visual-diff", "/es/pr-visual-diff/"),
138 ("pr-test-git-clone-test", "/es/pr-test-git-clone-test/"),
139 ("pr-test", "/es/pr-test/"),
140 ("pr-readthedocs_output", "/es/pr-readthedocs_output/"),
141 ("pr-js-client", "/es/pr-js-client/"),
142 ("pr-homepage-edition", "/es/pr-homepage-edition/"),
143 ("pr-docusaurus", "/es/pr-docusaurus/"),
144 ("poetry-asdf", "/es/poetry-asdf/"),
145 ("poetry", "/es/poetry/"),
146 ("pelican", "/es/pelican/"),
147 ("pdf-rinohtype", "/es/pdf-rinohtype/"),
148 ("pdf-multiple", "/es/pdf-multiple/"),
149 ("pdf-cmd-fail", "/es/pdf-cmd-fail/"),
150 ("pdf-build-jobs", "/es/pdf-build-jobs/"),
151 ("ooops-all-json", "/es/ooops-all-json/"),
152 ("old-output-directory", "/es/old-output-directory/"),
153 ("no-pr-build", "/es/no-pr-build/"),
154 ("no-html-theme-defined", "/es/no-html-theme-defined/"),
155 ("no-conf-py", "/es/no-conf-py/"),
156 ("no-config-file", "/es/no-config-file/"),
157 ("monorepo", "/es/monorepo/"),
158 ("mkdocs-pdf", "/es/mkdocs-pdf/"),
159 ("mkdocs-material", "/es/mkdocs-material/"),
160 ("mkdocs-htmlzip", "/es/mkdocs-htmlzip/"),
161 ("mkdocs-config-at-root", "/es/mkdocs-config-at-root/"),
162 ("mkdocs", "/es/mkdocs/"),
163 ("manual-integrations", "/es/manual-integrations/"),
164 ("manual-integration-docsify", "/es/manual-integration-docsify/"),
165 ("mamba", "/es/mamba/"),
166 ("main", "/es/main/"),
167 ("linkcheck", "/es/linkcheck/"),
168 ("jupyter-notebook", "/es/jupyter-notebook/"),
169 ("jupyter-book", "/es/jupyter-book/"),
170 ("jsdoc-autoapi", "/es/jsdoc-autoapi/"),
171 ("jsdoc", "/es/jsdoc/"),
172 ("invalid-docker-image", "/es/invalid-docker-image/"),
173 ("install-setuptools", "/es/install-setuptools/"),
174 ("image", "/es/image/"),
175 ("humitos-poetry", "/es/humitos-poetry/"),
176 ("humitos-patch-2", "/es/humitos-patch-2/"),
177 ("humitos-patch-1", "/es/humitos-patch-1/"),
178 ("git-submodules-invalid", "/es/git-submodules-invalid/"),
179 ("git-submodules", "/es/git-submodules/"),
180 ("git-lfs-build-jobs", "/es/git-lfs-build-jobs/"),
181 ("furo", "/es/furo/"),
182 ("expose-env-pip-error", "/es/expose-env-pip-error/"),
183 ("explicit-flyout-placement", "/es/explicit-flyout-placement/"),
184 ("expirement", "/es/expirement/"),
185 ("envvar-config-file", "/es/envvar-config-file/"),
186 ("docusaurus", "/es/docusaurus/"),
187 ("docsify-ads", "/es/docsify-ads/"),
188 ("docsify", "/es/docsify/"),
189 ("docdiff-example", "/es/docdiff-example/"),
190 ("delete-sources", "/es/delete-sources/"),
191 ("d2lbook", "/es/d2lbook/"),
192 ("custom-404-page", "/es/custom-404-page/"),
193 ("csrf", "/es/csrf/"),
194 ("build-tools-update-2", "/es/build-tools-update-2/"),
195 ("build-tools-mamba", "/es/build-tools-mamba/"),
196 ("build-tools-conda", "/es/build-tools-conda/"),
197 ("build-tools", "/es/build-tools/"),
198 ("build-os-error-message", "/es/build-os-error-message/"),
199 ("build-latest-python-3.8", "/es/build-latest-python-3.8/"),
200 ("build-jobs-spaces-in-command", "/es/build-jobs-spaces-in-command/"),
201 ("build-jobs-post-build", "/es/build-jobs-post-build/"),
202 ("build-jobs-multiline", "/es/build-jobs-multiline/"),
203 ("build-jobs-diff-exit", "/es/build-jobs-diff-exit/"),
204 ("build-jobs", "/es/build-jobs/"),
205 ("build-image", "/es/build-image/"),
206 ("build-commands-pr", "/es/build-commands-pr/"),
207 ("build-commands-multiline", "/es/build-commands-multiline/"),
208 ("build-commands-env-vars", "/es/build-commands-env-vars/"),
209 ("build-commands", "/es/build-commands/"),
210 ("bare-commands", "/es/bare-commands/"),
211 ("asciidoctor", "/es/asciidoctor/"),
212 ("all-formats-build-jobs", "/es/all-formats-build-jobs/"),
213 ("all-formats-build-commands", "/es/all-formats-build-commands/"),
214 ("agj-test-pr", "/es/agj-test-pr/"),
215 ("agj-rtd-tf-example", "/es/agj-rtd-tf-example/"),
216 ],
217 'downloads': [
218 ],
219 'subprojects': [
220 ("stsewd-demo", "https://test.org.stsewd.dev/stsewd-demo/en/custom-404-page/"),
221 ],
222 'slug': 'another-test-stsewd',
223 'name': u'another-test-stsewd',
224 'rtd_language': u'es',
225 'programming_language': u'words',
226 'canonical_url': '',
227 'analytics_code': 'None',
228 'single_version': False,
229 'conf_py_path': '/docs/',
230 'api_host': 'https://readthedocs.org',
231 'github_user': 'readthedocs',
232 'proxied_api_host': '/_',
233 'github_repo': 'test-builds',
234 'github_version': 'ubuntu-22.04-python3.6',
235 'display_github': True,
236 'bitbucket_user': 'None',
237 'bitbucket_repo': 'None',
238 'bitbucket_version': 'ubuntu-22.04-python3.6',
239 'display_bitbucket': False,
240 'gitlab_user': 'None',
241 'gitlab_repo': 'None',
242 'gitlab_version': 'ubuntu-22.04-python3.6',
243 'display_gitlab': False,
244 'READTHEDOCS': True,
245 'using_theme': (html_theme == "default"),
246 'new_theme': (html_theme == "sphinx_rtd_theme"),
247 'source_suffix': SUFFIX,
248 'ad_free': False,
249 'docsearch_disabled': False,
250 'user_analytics_code': '',
251 'global_analytics_code': 'UA-17997319-1',
252 'commit': '43b44b2c',
253}
254
255# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
256# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
257if version_info >= (1, 8):
258 if not globals().get('html_baseurl'):
259 html_baseurl = context['canonical_url']
260 context['canonical_url'] = None
261
262
263
264
265
266if 'html_context' in globals():
267 for key in context:
268 if key not in html_context:
269 html_context[key] = context[key]
270else:
271 html_context = context
272
273# Add custom RTD extension
274if 'extensions' in globals():
275 # Insert at the beginning because it can interfere
276 # with other extensions.
277 # See https://github.com/rtfd/readthedocs.org/pull/4054
278 extensions.insert(0, "readthedocs_ext.readthedocs")
279else:
280 extensions = ["readthedocs_ext.readthedocs"]
281
282# Add External version warning banner to the external version documentation
283if 'branch' == 'external':
284 extensions.insert(1, "readthedocs_ext.external_version_warning")
285 readthedocs_vcs_url = 'None'
286 readthedocs_build_url = 'https://readthedocs.org/projects/another-test-stsewd/builds/22272443/'
287
288project_language = 'es'
289
290# User's Sphinx configurations
291language_user = globals().get('language', None)
292latex_engine_user = globals().get('latex_engine', None)
293latex_elements_user = globals().get('latex_elements', None)
294
295# Remove this once xindy gets installed in Docker image and XINDYOPS
296# env variable is supported
297# https://github.com/rtfd/readthedocs-docker-images/pull/98
298latex_use_xindy = False
299
300chinese = any([
301 language_user in ('zh_CN', 'zh_TW'),
302 project_language in ('zh_CN', 'zh_TW'),
303])
304
305japanese = any([
306 language_user == 'ja',
307 project_language == 'ja',
308])
309
310if chinese:
311 latex_engine = latex_engine_user or 'xelatex'
312
313 latex_elements_rtd = {
314 'preamble': '\\usepackage[UTF8]{ctex}\n',
315 }
316 latex_elements = latex_elements_user or latex_elements_rtd
317elif japanese:
318 latex_engine = latex_engine_user or 'platex'
319
320# Make sure our build directory is always excluded
321exclude_patterns = globals().get('exclude_patterns', [])
322exclude_patterns.extend(['_build'])