conf.py
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# Add RTD Theme only if they aren't overriding it already
66using_rtd_theme = (
67 (
68 'html_theme' in globals() and
69 html_theme in ['default'] and
70 # Allow people to bail with a hack of having an html_style
71 'html_style' not in globals()
72 ) or 'html_theme' not in globals()
73)
74if using_rtd_theme:
75 html_theme = 'sphinx_rtd_theme'
76 html_style = None
77 html_theme_options = {}
78
79
80# This following legacy behavior will gradually be sliced out until its deprecated and removed.
81# Skipped for Sphinx 6+
82# Skipped by internal Feature flag SKIP_SPHINX_HTML_THEME_PATH
83# Skipped by all new projects since SKIP_SPHINX_HTML_THEME_PATH's introduction (jan 2023)
84if (
85 using_rtd_theme
86 and version_info < (6,0)
87 and not False
88 ):
89 theme = importlib.import_module('sphinx_rtd_theme')
90 if 'html_theme_path' in globals():
91 html_theme_path.append(theme.get_html_theme_path())
92 else:
93 html_theme_path = [theme.get_html_theme_path()]
94
95# Define websupport2_base_url and websupport2_static_url
96if globals().get('websupport2_base_url', False):
97 websupport2_base_url = 'https://readthedocs.org/websupport'
98 websupport2_static_url = 'https://assets.readthedocs.org/static/'
99
100
101#Add project information to the template context.
102context = {
103 'using_theme': using_rtd_theme,
104 'html_theme': html_theme,
105 'current_version': "search-special-chars",
106 'version_slug': "search-special-chars",
107 'MEDIA_URL': "https://media.readthedocs.org/",
108 'STATIC_URL': "https://assets.readthedocs.org/static/",
109 'PRODUCTION_DOMAIN': "readthedocs.org",
110 'proxied_static_path': "/_/static/",
111 'versions': [
112 ("latest", "/es/latest/"),
113 ("stable", "/es/stable/"),
114 ("5.0", "/es/5.0/"),
115 ("4.0", "/es/4.0/"),
116 ("wormhole", "/es/wormhole/"),
117 ("ubuntu-22.04", "/es/ubuntu-22.04/"),
118 ("theme-1.0rc1", "/es/theme-1.0rc1/"),
119 ("test-rebased-commit", "/es/test-rebased-commit/"),
120 ("symlink-via-zipfile", "/es/symlink-via-zipfile/"),
121 ("sudo-commands", "/es/sudo-commands/"),
122 ("submodule-not-found", "/es/submodule-not-found/"),
123 ("staticrypt", "/es/staticrypt/"),
124 ("sphinx-tectonic-pdf", "/es/sphinx-tectonic-pdf/"),
125 ("sphinx-multipage-html", "/es/sphinx-multipage-html/"),
126 ("sphinx-mkdocstrings", "/es/sphinx-mkdocstrings/"),
127 ("sphinx-hoverxref", "/es/sphinx-hoverxref/"),
128 ("sphinx-fork", "/es/sphinx-fork/"),
129 ("sphinx-docs-zundler", "/es/sphinx-docs-zundler/"),
130 ("sphinx-conf-nonstandard", "/es/sphinx-conf-nonstandard/"),
131 ("sphinx6.x-default", "/es/sphinx6.x-default/"),
132 ("sphinx5.x-default-confpy", "/es/sphinx5.x-default-confpy/"),
133 ("sphinx-5.x", "/es/sphinx-5.x/"),
134 ("sphinx-1.8", "/es/sphinx-1.8/"),
135 ("sphinx-1.7", "/es/sphinx-1.7/"),
136 ("sphinx-1.6", "/es/sphinx-1.6/"),
137 ("skip-build-command", "/es/skip-build-command/"),
138 ("singlehtml", "/es/singlehtml/"),
139 ("shot-scraper", "/es/shot-scraper/"),
140 ("search-special-chars", "/es/search-special-chars/"),
141 ("rust", "/es/rust/"),
142 ("rtd-sphinx-ext", "/es/rtd-sphinx-ext/"),
143 ("robots-txt", "/es/robots-txt/"),
144 ("regular-404-page", "/es/regular-404-page/"),
145 ("recommonmark", "/es/recommonmark/"),
146 ("readthedocs-docs-build-commands", "/es/readthedocs-docs-build-commands/"),
147 ("py3.11a", "/es/py3.11a/"),
148 ("py3.11", "/es/py3.11/"),
149 ("py3.10", "/es/py3.10/"),
150 ("pr-visual-diff", "/es/pr-visual-diff/"),
151 ("pr-homepage-edition", "/es/pr-homepage-edition/"),
152 ("poetry-asdf", "/es/poetry-asdf/"),
153 ("poetry", "/es/poetry/"),
154 ("pelican", "/es/pelican/"),
155 ("pdf-rinohtype", "/es/pdf-rinohtype/"),
156 ("pdf-cmd-fail", "/es/pdf-cmd-fail/"),
157 ("ooops-all-json", "/es/ooops-all-json/"),
158 ("old-output-directory", "/es/old-output-directory/"),
159 ("no-conf-py", "/es/no-conf-py/"),
160 ("no-config-file", "/es/no-config-file/"),
161 ("mkdocs-pdf", "/es/mkdocs-pdf/"),
162 ("mkdocs-material", "/es/mkdocs-material/"),
163 ("mkdocs-htmlzip", "/es/mkdocs-htmlzip/"),
164 ("mkdocs-config-at-root", "/es/mkdocs-config-at-root/"),
165 ("mkdocs", "/es/mkdocs/"),
166 ("manual-integrations", "/es/manual-integrations/"),
167 ("manual-integration-docsify", "/es/manual-integration-docsify/"),
168 ("mamba", "/es/mamba/"),
169 ("main", "/es/main/"),
170 ("jupyter-notebook", "/es/jupyter-notebook/"),
171 ("jupyter-book", "/es/jupyter-book/"),
172 ("jsdoc-autoapi", "/es/jsdoc-autoapi/"),
173 ("jsdoc", "/es/jsdoc/"),
174 ("install-setuptools", "/es/install-setuptools/"),
175 ("image", "/es/image/"),
176 ("humitos-poetry", "/es/humitos-poetry/"),
177 ("git-submodules-invalid", "/es/git-submodules-invalid/"),
178 ("git-submodules", "/es/git-submodules/"),
179 ("git-lfs-build-jobs", "/es/git-lfs-build-jobs/"),
180 ("furo", "/es/furo/"),
181 ("expose-env-pip-error", "/es/expose-env-pip-error/"),
182 ("explicit-flyout-placement", "/es/explicit-flyout-placement/"),
183 ("expirement", "/es/expirement/"),
184 ("envvar-config-file", "/es/envvar-config-file/"),
185 ("docusaurus", "/es/docusaurus/"),
186 ("docsify-ads", "/es/docsify-ads/"),
187 ("docsify", "/es/docsify/"),
188 ("delete-sources", "/es/delete-sources/"),
189 ("d2lbook", "/es/d2lbook/"),
190 ("custom-404-page", "/es/custom-404-page/"),
191 ("csrf", "/es/csrf/"),
192 ("build-tools-update-2", "/es/build-tools-update-2/"),
193 ("build-tools-mamba", "/es/build-tools-mamba/"),
194 ("build-tools-conda", "/es/build-tools-conda/"),
195 ("build-tools", "/es/build-tools/"),
196 ("build-os-error-message", "/es/build-os-error-message/"),
197 ("build-jobs-spaces-in-command", "/es/build-jobs-spaces-in-command/"),
198 ("build-jobs-post-build", "/es/build-jobs-post-build/"),
199 ("build-jobs-multiline", "/es/build-jobs-multiline/"),
200 ("build-jobs-diff-exit", "/es/build-jobs-diff-exit/"),
201 ("build-jobs", "/es/build-jobs/"),
202 ("build-commands-env-vars", "/es/build-commands-env-vars/"),
203 ("build-commands", "/es/build-commands/"),
204 ("all-formats-build-jobs", "/es/all-formats-build-jobs/"),
205 ("all-formats-build-commands", "/es/all-formats-build-commands/"),
206 ("agj-test-pr", "/es/agj-test-pr/"),
207 ("agj-rtd-tf-example", "/es/agj-rtd-tf-example/"),
208 ],
209 'downloads': [
210 ],
211 'subprojects': [
212 ("stsewd-demo", "https://test.org.stsewd.dev/projects/stsewd-demo/en/custom-404-page/"),
213 ],
214 'slug': 'another-test-stsewd',
215 'name': u'another-test-stsewd',
216 'rtd_language': u'es',
217 'programming_language': u'words',
218 'canonical_url': 'https://test.org.stsewd.dev/es/latest/',
219 'analytics_code': 'None',
220 'single_version': False,
221 'conf_py_path': '/docs/',
222 'api_host': 'https://readthedocs.org',
223 'github_user': 'readthedocs',
224 'proxied_api_host': '/_',
225 'github_repo': 'test-builds',
226 'github_version': 'search-special-chars',
227 'display_github': True,
228 'bitbucket_user': 'None',
229 'bitbucket_repo': 'None',
230 'bitbucket_version': 'search-special-chars',
231 'display_bitbucket': False,
232 'gitlab_user': 'None',
233 'gitlab_repo': 'None',
234 'gitlab_version': 'search-special-chars',
235 'display_gitlab': False,
236 'READTHEDOCS': True,
237 'using_theme': (html_theme == "default"),
238 'new_theme': (html_theme == "sphinx_rtd_theme"),
239 'source_suffix': SUFFIX,
240 'ad_free': False,
241 'docsearch_disabled': False,
242 'user_analytics_code': '',
243 'global_analytics_code': 'UA-17997319-1',
244 'commit': '9340fd89',
245}
246
247# For sphinx >=1.8 we can use html_baseurl to set the canonical URL.
248# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_baseurl
249if version_info >= (1, 8):
250 if not globals().get('html_baseurl'):
251 html_baseurl = context['canonical_url']
252 context['canonical_url'] = None
253
254
255
256
257
258if 'html_context' in globals():
259
260 html_context.update(context)
261
262else:
263 html_context = context
264
265# Add custom RTD extension
266if 'extensions' in globals():
267 # Insert at the beginning because it can interfere
268 # with other extensions.
269 # See https://github.com/rtfd/readthedocs.org/pull/4054
270 extensions.insert(0, "readthedocs_ext.readthedocs")
271else:
272 extensions = ["readthedocs_ext.readthedocs"]
273
274# Add External version warning banner to the external version documentation
275if 'branch' == 'external':
276 extensions.insert(1, "readthedocs_ext.external_version_warning")
277 readthedocs_vcs_url = 'None'
278 readthedocs_build_url = 'https://readthedocs.org/projects/another-test-stsewd/builds/20012508/'
279
280project_language = 'es'
281
282# User's Sphinx configurations
283language_user = globals().get('language', None)
284latex_engine_user = globals().get('latex_engine', None)
285latex_elements_user = globals().get('latex_elements', None)
286
287# Remove this once xindy gets installed in Docker image and XINDYOPS
288# env variable is supported
289# https://github.com/rtfd/readthedocs-docker-images/pull/98
290latex_use_xindy = False
291
292chinese = any([
293 language_user in ('zh_CN', 'zh_TW'),
294 project_language in ('zh_CN', 'zh_TW'),
295])
296
297japanese = any([
298 language_user == 'ja',
299 project_language == 'ja',
300])
301
302if chinese:
303 latex_engine = latex_engine_user or 'xelatex'
304
305 latex_elements_rtd = {
306 'preamble': '\\usepackage[UTF8]{ctex}\n',
307 }
308 latex_elements = latex_elements_user or latex_elements_rtd
309elif japanese:
310 latex_engine = latex_engine_user or 'platex'
311
312# Make sure our build directory is always excluded
313exclude_patterns = globals().get('exclude_patterns', [])
314exclude_patterns.extend(['_build'])
~
(bitwise NOT)
A title to search for ~
, or any other special characters.
Other special characters
Example: |
, &
.