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