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