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