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