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 = 'shibuya'
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# Define this variable in case it's not defined by the user.
66# It defaults to `alabaster` which is the default from Sphinx.
67# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_theme
68html_theme = globals().get('html_theme', 'alabaster')
69
70#Add project information to the template context.
71context = {
72 'html_theme': html_theme,
73 'current_version': "shibuya-theme",
74 'version_slug': "shibuya-theme",
75 'MEDIA_URL': "https://media.readthedocs.org/",
76 'STATIC_URL': "https://assets.readthedocs.org/static/",
77 'PRODUCTION_DOMAIN': "readthedocs.org",
78 'proxied_static_path': "/_/static/",
79 'versions': [
80 ("latest", "/en/latest/"),
81 ("2.0", "/en/2.0/"),
82 ("yaml-v2", "/en/yaml-v2/"),
83 ("wormhole", "/en/wormhole/"),
84 ("vitepress", "/en/vitepress/"),
85 ("use-requirements-from-submodule", "/en/use-requirements-from-submodule/"),
86 ("use-py2", "/en/use-py2/"),
87 ("use-apt", "/en/use-apt/"),
88 ("update-conda-startup", "/en/update-conda-startup/"),
89 ("unicode-paths", "/en/unicode-paths/"),
90 ("unicode-filename", "/en/unicode-filename/"),
91 ("d--branch", "/en/d--branch/"),
92 ("ubuntu-22.04-python3.x", "/en/ubuntu-22.04-python3.x/"),
93 ("ubuntu-22.04-python3.6", "/en/ubuntu-22.04-python3.6/"),
94 ("ubuntu-22.04-python3.12", "/en/ubuntu-22.04-python3.12/"),
95 ("ubuntu-22.04-python2.7", "/en/ubuntu-22.04-python2.7/"),
96 ("ubuntu-22.04", "/en/ubuntu-22.04/"),
97 ("ubuntu-20.04-python-3.9", "/en/ubuntu-20.04-python-3.9/"),
98 ("ubuntu-20.04", "/en/ubuntu-20.04/"),
99 ("typlog-theme", "/en/typlog-theme/"),
100 ("timetest", "/en/timetest/"),
101 ("timeout", "/en/timeout/"),
102 ("throw-exception", "/en/throw-exception/"),
103 ("test-ubuntu-20.04", "/en/test-ubuntu-20.04/"),
104 ("test-paths-with-spaces", "/en/test-paths-with-spaces/"),
105 ("test-parent-path-error", "/en/test-parent-path-error/"),
106 ("test-auto-cancel", "/en/test-auto-cancel/"),
107 ("template-config-file", "/en/template-config-file/"),
108 ("sudo-commands", "/en/sudo-commands/"),
109 ("submodule-not-found", "/en/submodule-not-found/"),
110 ("submodule-https-scheme", "/en/submodule-https-scheme/"),
111 ("submodule-git-scheme", "/en/submodule-git-scheme/"),
112 ("staticrypt", "/en/staticrypt/"),
113 ("sphinx-tectonic-pdf", "/en/sphinx-tectonic-pdf/"),
114 ("sphinx-multipage-html", "/en/sphinx-multipage-html/"),
115 ("sphinx-mkdocstrings", "/en/sphinx-mkdocstrings/"),
116 ("sphinx-latest", "/en/sphinx-latest/"),
117 ("sphinx-hoverxref", "/en/sphinx-hoverxref/"),
118 ("sphinx.ext.duration", "/en/sphinx.ext.duration/"),
119 ("sphinx-docs-zundler", "/en/sphinx-docs-zundler/"),
120 ("sphinx-conf-nonstandard", "/en/sphinx-conf-nonstandard/"),
121 ("sphinx-awesome", "/en/sphinx-awesome/"),
122 ("sphinx-7.0.x", "/en/sphinx-7.0.x/"),
123 ("sphinx6.x-default", "/en/sphinx6.x-default/"),
124 ("sphinx-1.8", "/en/sphinx-1.8/"),
125 ("skip-build-command-pr-test3", "/en/skip-build-command-pr-test3/"),
126 ("skip-build-command-pr-test2", "/en/skip-build-command-pr-test2/"),
127 ("skip-build-command", "/en/skip-build-command/"),
128 ("singlehtml", "/en/singlehtml/"),
129 ("shibuya-theme", "/en/shibuya-theme/"),
130 ("shibuya", "/en/shibuya/"),
131 ("search-special-chars", "/en/search-special-chars/"),
132 ("rust-1.75", "/en/rust-1.75/"),
133 ("rust", "/en/rust/"),
134 ("robots-txt", "/en/robots-txt/"),
135 ("requirements-not-found", "/en/requirements-not-found/"),
136 ("readthedocs-docs-build-commands", "/en/readthedocs-docs-build-commands/"),
137 ("python-system-packages", "/en/python-system-packages/"),
138 ("python-setuptools-package", "/en/python-setuptools-package/"),
139 ("pypy3.5", "/en/pypy3.5/"),
140 ("pydata-theme", "/en/pydata-theme/"),
141 ("py3.9", "/en/py3.9/"),
142 ("public", "/en/public/"),
143 ("pr-visual-diff", "/en/pr-visual-diff/"),
144 ("pr-test-git-clone-test", "/en/pr-test-git-clone-test/"),
145 ("pr-test", "/en/pr-test/"),
146 ("pr-readthedocs_output", "/en/pr-readthedocs_output/"),
147 ("pr-js-client", "/en/pr-js-client/"),
148 ("pr-homepage-edition", "/en/pr-homepage-edition/"),
149 ("pr-docusaurus", "/en/pr-docusaurus/"),
150 ("poetry-asdf", "/en/poetry-asdf/"),
151 ("poetry", "/en/poetry/"),
152 ("pelican", "/en/pelican/"),
153 ("pdoc", "/en/pdoc/"),
154 ("pdf-rinohtype", "/en/pdf-rinohtype/"),
155 ("pdf-cmd-fail", "/en/pdf-cmd-fail/"),
156 ("pdf-build-jobs", "/en/pdf-build-jobs/"),
157 ("old-output-directory", "/en/old-output-directory/"),
158 ("no-pr-build", "/en/no-pr-build/"),
159 ("no-html-theme-defined", "/en/no-html-theme-defined/"),
160 ("no-conf-py", "/en/no-conf-py/"),
161 ("no-config-file", "/en/no-config-file/"),
162 ("multiple-source-suffix", "/en/multiple-source-suffix/"),
163 ("monorepo", "/en/monorepo/"),
164 ("mkdocs-terminal", "/en/mkdocs-terminal/"),
165 ("mkdocs-python-tags", "/en/mkdocs-python-tags/"),
166 ("mkdocs-pdf", "/en/mkdocs-pdf/"),
167 ("mkdocs-material", "/en/mkdocs-material/"),
168 ("mkdocs-htmlzip", "/en/mkdocs-htmlzip/"),
169 ("mkdocs-config-at-root", "/en/mkdocs-config-at-root/"),
170 ("mkdocs", "/en/mkdocs/"),
171 ("mamba", "/en/mamba/"),
172 ("latest-aliases", "/en/latest-aliases/"),
173 ("jupyter-book", "/en/jupyter-book/"),
174 ("jsdoc-autoapi", "/en/jsdoc-autoapi/"),
175 ("jsdoc", "/en/jsdoc/"),
176 ("jekyll", "/en/jekyll/"),
177 ("japanese-pdf", "/en/japanese-pdf/"),
178 ("invalid-submodules", "/en/invalid-submodules/"),
179 ("invalid-docker-image", "/en/invalid-docker-image/"),
180 ("install-setuptools", "/en/install-setuptools/"),
181 ("insipid-theme", "/en/insipid-theme/"),
182 ("immaterial-theme", "/en/immaterial-theme/"),
183 ("htmldir", "/en/htmldir/"),
184 ("git-submodules-invalid", "/en/git-submodules-invalid/"),
185 ("git-submodules", "/en/git-submodules/"),
186 ("git-lfs-build-jobs", "/en/git-lfs-build-jobs/"),
187 ("furo", "/en/furo/"),
188 ("full-feature", "/en/full-feature/"),
189 ("foo", "/en/foo/"),
190 ("expose-env-pip-error", "/en/expose-env-pip-error/"),
191 ("envvar-config-file", "/en/envvar-config-file/"),
192 ("environment-variables", "/en/environment-variables/"),
193 ("docusaurus", "/en/docusaurus/"),
194 ("docsify", "/en/docsify/"),
195 ("disable-sphinx-manipulation", "/en/disable-sphinx-manipulation/"),
196 ("diffme-b", "/en/diffme-b/"),
197 ("diffme-a", "/en/diffme-a/"),
198 ("diffme", "/en/diffme/"),
199 ("d2lbook", "/en/d2lbook/"),
200 ("config-file-with-wrong-version-number", "/en/config-file-with-wrong-version-number/"),
201 ("conda-pin-common-deps", "/en/conda-pin-common-deps/"),
202 ("conda-env-py3.7", "/en/conda-env-py3.7/"),
203 ("conda-env-no-py-pinned", "/en/conda-env-no-py-pinned/"),
204 ("conda-env", "/en/conda-env/"),
205 ("conda-build-commands", "/en/conda-build-commands/"),
206 ("c-dependencies", "/en/c-dependencies/"),
207 ("build-tools-mamba", "/en/build-tools-mamba/"),
208 ("build-tools-golang-invalid", "/en/build-tools-golang-invalid/"),
209 ("build-tools-conda", "/en/build-tools-conda/"),
210 ("build-tools", "/en/build-tools/"),
211 ("build-os-error-message", "/en/build-os-error-message/"),
212 ("build-latest-python-3.8", "/en/build-latest-python-3.8/"),
213 ("build-jobs-spaces-in-command", "/en/build-jobs-spaces-in-command/"),
214 ("build-jobs-post-build", "/en/build-jobs-post-build/"),
215 ("build-jobs-multiline", "/en/build-jobs-multiline/"),
216 ("build-jobs-diff-exit", "/en/build-jobs-diff-exit/"),
217 ("build-jobs", "/en/build-jobs/"),
218 ("build-internals", "/en/build-internals/"),
219 ("build-commands-multiline", "/en/build-commands-multiline/"),
220 ("build-commands-env-vars", "/en/build-commands-env-vars/"),
221 ("build-commands", "/en/build-commands/"),
222 ("branch-with-slashes", "/en/branch-with-slashes/"),
223 ("bare-commands", "/en/bare-commands/"),
224 ("asciidoctor", "/en/asciidoctor/"),
225 ("antora", "/en/antora/"),
226 ("annotated-tag", "/en/annotated-tag/"),
227 ("all-formats-build-jobs", "/en/all-formats-build-jobs/"),
228 ("all-formats-build-commands", "/en/all-formats-build-commands/"),
229 ("all-formats", "/en/all-formats/"),
230 ("alabaster-theme", "/en/alabaster-theme/"),
231 ("addons-web-component", "/en/addons-web-component/"),
232 ],
233 'downloads': [
234 ],
235 'subprojects': [
236 ],
237 'slug': 'test-builds',
238 'name': u'test-builds',
239 'rtd_language': u'en',
240 'programming_language': u'words',
241 'canonical_url': '',
242 'analytics_code': 'UA-12341234-1',
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': 'shibuya-theme',
250 'display_github': True,
251 'bitbucket_user': 'None',
252 'bitbucket_repo': 'None',
253 'bitbucket_version': 'shibuya-theme',
254 'display_bitbucket': False,
255 'gitlab_user': 'None',
256 'gitlab_repo': 'None',
257 'gitlab_version': 'shibuya-theme',
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': 'UA-12341234-1',
266 'global_analytics_code': None,
267 'commit': 'a2efad46',
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/test-builds/builds/25439342/'
302
303project_language = 'en'
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'])