@@ -25,7 +25,7 @@ This can be because the project is not correctly configured,
25
25
because the contents of the Git repository cannot be built,
26
26
or in the most rare cases because a system that Read the Docs connects to is not working.
27
27
28
- First, you should check out the Builds tab of your project.
28
+ First, you should check out the :guilabel: ` Builds ` tab of your project.
29
29
By clicking on the failing step,
30
30
you will be able to see details that can lead to resolutions to your build error.
31
31
@@ -42,25 +42,6 @@ you can use an important word or message from the error to search for a solution
42
42
* :ref: `faq:why do i get import errors from libraries depending on c modules? `
43
43
44
44
45
- .. Old reference
46
- .. _Help, my build passed but my documentation page is 404 Not Found! :
47
-
48
- Why does my project have status "passed" but I get a 404 page?
49
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
-
51
- This often happens because you don't have an `index.html ` file being generated.
52
-
53
- Make sure you have one of the following files at the top level of your documentation source:
54
-
55
- * `index.rst ` (Sphinx)
56
- * `index.md ` (MkDocs or Sphinx with MyST)
57
-
58
- .. tip ::
59
-
60
- To test if your docs actually built correctly,
61
- you can navigate to a specific page that you know is part of the documentation build,
62
- for example `/en/latest/README.html `.
63
-
64
45
Why do I get import errors from libraries depending on C modules?
65
46
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66
47
@@ -76,18 +57,21 @@ successfully build the documentation despite missing dependencies.
76
57
77
58
With Sphinx you can use the built-in `autodoc_mock_imports `_ for mocking. If
78
59
such libraries are installed via ``setup.py ``, you also will need to remove all
79
- the C-dependent libraries from your ``install_requires `` in the RTD environment.
60
+ the C-dependent libraries from your ``install_requires `` in the Read the Docs environment.
80
61
81
62
.. _autodoc_mock_imports : http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_mock_imports
82
63
83
- Where do I need to put my docs for RTD to find it?
84
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
64
86
- Read the Docs will crawl your project looking for a ``conf.py ``. Where it finds the ``conf.py ``,
87
- it will run ``sphinx-build `` in that directory.
88
- So as long as you only have one set of sphinx documentation in your project, it should Just Work.
65
+ Where do I need to put my docs for Read the Docs to find it?
66
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67
+
68
+ You can put your docs wherever your want on your repository.
69
+ However, you will need to tell Read the Docs where your Sphinx's (i.e. ``conf.py ``)
70
+ or MkDocs' (i.e. ``mkdocs.yml ``) configuration file lives in order to build your documentation.
71
+
72
+ This is done by using ``sphinx.configuration `` or ``mkdocs.configuration `` config key in your Read the Docs configuration file.
73
+ Read :doc: `config-file/index ` to know more about this.
89
74
90
- You can specify an exact path to your documentation using a Read the Docs :doc: `config-file/index `.
91
75
92
76
How can I avoid search results having a deprecated version of my docs?
93
77
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -153,26 +137,10 @@ You can also set your project documentation to install your Python project itsel
153
137
* :ref: `faq:Why do I get import errors from libraries depending on C modules? `
154
138
155
139
156
- Can I have access to additional features or settings?
157
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
158
-
159
- If this is just a dependency issue,
160
- see :ref: `faq:How do I add additional software dependencies for my documentation? `.
161
-
162
- Read the Docs offers some settings (feature flags) which can be used for a variety of purposes.
163
- To enable these settings,
164
- please send an email to
[email protected] and we will change the settings for the project.
165
-
166
- .. seealso ::
167
-
168
- :doc: `/feature-flags `
169
- Reference of all Feature Flags that can be requested.
170
-
171
-
172
140
How do I change behavior when building with Read the Docs?
173
141
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174
142
175
- When RTD builds your project, it sets the :envvar: `READTHEDOCS ` environment
143
+ When Read the Docs builds your project, it sets the :envvar: `READTHEDOCS ` environment
176
144
variable to the string ``'True' ``. So within your Sphinx :file: `conf.py ` file, you
177
145
can vary the behavior based on this. For example:
178
146
@@ -187,7 +155,7 @@ can vary the behavior based on this. For example:
187
155
html_theme = " nature"
188
156
189
157
The :envvar: `READTHEDOCS ` variable is also available in the Sphinx build
190
- environment, and will be set to ``True `` when building on RTD :
158
+ environment, and will be set to ``True `` when building on Read the Docs :
191
159
192
160
193
161
.. code-block :: jinja
@@ -200,8 +168,8 @@ environment, and will be set to ``True`` when building on RTD:
200
168
I want comments in my docs
201
169
~~~~~~~~~~~~~~~~~~~~~~~~~~
202
170
203
- RTD doesn't have explicit support for this.
204
- That said, a tool like `Disqus `_ (and the `sphinxcontrib-disqus `_ plugin) can be used for this purpose on RTD .
171
+ Read the Docs doesn't have explicit support for this.
172
+ That said, a tool like `Disqus `_ (and the `sphinxcontrib-disqus `_ plugin) can be used for this purpose on Read the Docs .
205
173
206
174
.. _Disqus : https://disqus.com/
207
175
.. _sphinxcontrib-disqus : https://pypi.python.org/pypi/sphinxcontrib-disqus
@@ -245,7 +213,7 @@ https://celery.readthedocs.io/projects/kombu/en/latest/
245
213
246
214
This also works the same for custom domains:
247
215
248
- http://docs..org /projects/kombu/en/latest/
216
+ http://docs.celeryq.dev /projects/kombu/en/latest/
249
217
250
218
You can add subprojects in the project admin dashboard.
251
219
@@ -262,36 +230,28 @@ See the section on :doc:`localization`.
262
230
Sphinx
263
231
------
264
232
265
- I want to use the Blue/Default Sphinx theme
266
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
267
-
268
- We think that our theme is badass,
269
- and better than the default for many reasons.
270
- Some people don't like change though |:smile: |,
271
- so there is a hack that will let you keep using the default theme.
272
- If you set the ``html_style `` variable in your ``conf.py ``,
273
- it should default to using the default theme.
274
- The value of this doesn't matter, and can be set to ``/default.css `` for default behavior.
275
233
234
+ .. Old references
235
+ .. _I want to use the Blue/Default Sphinx theme :
236
+ .. _I want to use the Read the Docs theme locally :
276
237
277
- I want to use the Read the Docs theme locally
278
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238
+ I want to use the Read the Docs theme
239
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
279
240
280
- Read the Docs automatically applies the sphinx-rtd-theme to projects that do not have a defined theme.
281
- If you build a Sphinx project locally,
282
- you should specify that you are using sphinx-rtd-theme.
241
+ To use the Read the Docs theme,
242
+ you have to specify that in your Sphinx's ``conf.py `` file.
283
243
284
- .. seealso ::
285
-
286
- `sphinx-rtd-theme documentation <https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html >`_
287
- See the official documentation for instructions to enable it in your Sphinx theme.
244
+ Read the `sphinx-rtd-theme documentation <https://sphinx-rtd-theme.readthedocs.io/en/stable/installing.html >`_
245
+ for instructions to enable it in your Sphinx project.
288
246
289
247
290
248
Image scaling doesn't work in my documentation
291
249
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
292
250
293
- Image scaling in docutils depends on PIL. PIL is installed in the system that RTD runs on. However, if you are using the virtualenv building option, you will likely need to include PIL in your requirements for your project.
294
-
251
+ Image scaling in ``docutils `` depends on ``Pillow ``.
252
+ If you notice that image scaling is not working properly on your Sphinx project,
253
+ you may need to add ``Pillow `` to your requirements to fix this issue.
254
+ Read more about :doc: `guides/reproducible-builds ` to define your dependencies in a ``requirements.txt `` file.
295
255
296
256
Python
297
257
------
@@ -300,30 +260,12 @@ Can I document a Python package that is not at the root of my repository?
300
260
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
301
261
302
262
Yes. The most convenient way to access a Python package for example via
303
- `Sphinx's autoapi `_ in your documentation is to use the *Install your project
304
- inside a virtualenv using setup.py install * option in the admin panel of
305
- your project. However this assumes that your ``setup.py `` is in the root of
306
- your repository.
263
+ `Sphinx's autoapi `_ in your documentation is to use the
264
+ ``python.install.method: pip `` (:ref: `config-file/v2:python.install `) configuration key.
307
265
308
- If you want to place your package in a different directory or have multiple
309
- Python packages in the same project, then create a pip requirements file. You
310
- can specify the relative path to your package inside the file.
311
- For example you want to keep your Python package in the ``src/python ``
312
- directory, then create a ``requirements.txt `` file with the
313
- following contents::
266
+ This configuration will tell Read the Docs to install your package in
267
+ the virtual environment used to build your documentation so your documentation tool can access to it.
314
268
315
- src/python/
316
-
317
- Please note that the path must be relative to the working directory where ``pip `` is launched,
318
- rather than the directory where the requirements file is located.
319
- Therefore, even if you want to move the requirements file to a ``requirements/ `` directory,
320
- the example path above would work.
321
-
322
- You can customize the path to your requirements file and any other installed dependency
323
- using a Read the Docs :doc: `config-file/index `.
324
-
325
- .. _Sphinx's autoapi : http://sphinx-doc.org/ext/autodoc.html
326
- .. _pip requirements file : https://pip.pypa.io/en/stable/user_guide.html#requirements-files
327
269
328
270
Does Read the Docs work well with "legible" docstrings?
329
271
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -354,8 +296,8 @@ and as a result, it tends to look a bit better with the default theme.
354
296
I need to install a package in a environment with pinned versions
355
297
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
356
298
357
- To ensure proper installation of a Python package, the `` pip `` :ref: ` install method < config-file/v2:python.install >` will automatically upgrade every dependency to its most recent version in case they aren't :term: ` pinned <pinning> ` by the package definition.
358
- If instead you'd like to pin your dependencies outside the package, you can add this line to your requirements or environment file (if you are using Conda).
299
+ If you'd like to pin your dependencies outside the package,
300
+ you can add this line to your requirements or environment file (if you are using Conda).
359
301
360
302
In your ``requirements.txt `` file::
361
303
@@ -368,26 +310,6 @@ In your Conda environment file (``environment.yml``)::
368
310
-e ..
369
311
370
312
371
- Can I use Anaconda Project and ``anaconda-project.yml ``?
372
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
373
-
374
- Yes. With ``anaconda-project>=0.8.4 `` you can use the `Anaconda Project `_ configuration
375
- file ``anaconda-project.yaml `` (or ``anaconda-project.yml ``) directly in place of a
376
- Conda environment file by using ``dependencies: `` as an alias for ``packages: ``.
377
-
378
- I.e., your ``anaconda-project.yaml `` file can be used as a ``conda.environment `` config
379
- in the ``.readthedocs.yaml `` config file if it contains::
380
-
381
- dependencies:
382
- - python=3.9
383
- - scipy
384
- ...
385
-
386
- .. _Anaconda Project : https://anaconda-project.readthedocs.io/en/latest/
387
-
388
-
389
-
390
-
391
313
Other documentation frameworks
392
314
------------------------------
393
315
0 commit comments