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