Skip to content

Commit 9cf1742

Browse files
committed
Wrap to 80 characters
1 parent d907524 commit 9cf1742

File tree

1 file changed

+58
-33
lines changed

1 file changed

+58
-33
lines changed

docs/builds.rst

+58-33
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,38 @@ Our current build limits are:
1515
We can increase build limits on a per-project basis,
1616
if you provide a good reason your documentation needs more resources.
1717

18-
You can see the current Docker build images that we use in our `docker repository <https://github.com/rtfd/readthedocs-docker-images>`_. `Docker Hub <https://hub.docker.com/r/readthedocs/build/>`_ also shows the latest set of images that have been built.
18+
You can see the current Docker build images that we use in our `docker
19+
repository <https://github.com/rtfd/readthedocs-docker-images>`_. `Docker Hub
20+
<https://hub.docker.com/r/readthedocs/build/>`_ also shows the latest set of
21+
images that have been built.
1922

20-
Currently in production we're using the ``readthedocs/build:2.0`` docker image as our default image.
23+
Currently in production we're using the ``readthedocs/build:2.0`` docker image
24+
as our default image.
2125

2226
How we build documentation
2327
--------------------------
2428

25-
When we import your documentation, we look at two things first: your *Repository URL* and the *Documentation Type*.
26-
We will clone your repository,
29+
When we import your documentation, we look at two things first: your
30+
*Repository URL* and the *Documentation Type*. We will clone your repository,
2731
and then build your documentation using the *Documentation Type* specified.
2832

2933
Sphinx
3034
~~~~~~
3135

32-
When you choose *Sphinx* as your *Documentation Type*,
33-
we will first look for a ``conf.py`` file in your repository.
34-
If we don't find one,
35-
we will generate one for you.
36-
We will look inside a ``doc`` or ``docs`` directory first,
37-
and then look within your entire project.
36+
When you choose *Sphinx* as your *Documentation Type*, we will first look for a
37+
``conf.py`` file in your repository. If we don't find one, we will generate one
38+
for you. We will look inside a ``doc`` or ``docs`` directory first, and then
39+
look within your entire project.
3840

3941
Then Sphinx will build any files with an ``.rst`` extension.
4042

4143
Mkdocs
4244
~~~~~~
4345

44-
When you choose *Mkdocs* as your *Documentation Type*,
45-
we will first look for a ``mkdocs.yml`` file in your repository.
46-
If we don't find one,
47-
we will generate one for you.
48-
We will look inside a ``doc`` or ``docs`` directory first,
49-
and then default to the top-level of your documentation.
46+
When you choose *Mkdocs* as your *Documentation Type*, we will first look for a
47+
``mkdocs.yml`` file in your repository. If we don't find one, we will generate
48+
one for you. We will look inside a ``doc`` or ``docs`` directory first, and
49+
then default to the top-level of your documentation.
5050

5151
Then Mkdocs will build any files with an ``.md`` extension. As MkDocs doesn't
5252
support automatic PDF generation, Read the Docs cannot create a PDF version of
@@ -55,17 +55,27 @@ your documentation with the *Mkdocs* option.
5555
Understanding what's going on
5656
-----------------------------
5757

58-
Understanding how Read the Docs builds your project will help you with debugging the problems you have with the site. It should also allow you to take advantage of certain things that happen during the build process.
58+
Understanding how Read the Docs builds your project will help you with
59+
debugging the problems you have with the site. It should also allow you to take
60+
advantage of certain things that happen during the build process.
5961

60-
The first step of the process is that we check out your code from the repository you have given us. If the code is already checked out, we update the copy to the branch that you have specified in your projects configuration.
62+
The first step of the process is that we check out your code from the
63+
repository you have given us. If the code is already checked out, we update the
64+
copy to the branch that you have specified in your projects configuration.
6165

62-
Then we build the proper backend code for the type of documentation you've selected.
66+
Then we build the proper backend code for the type of documentation you've
67+
selected.
6368

64-
If you have the *Install Project* option enabled, we will run ``setup.py install`` on your package, installing it into a virtual environment. You can also define additional packages to install with the *Requirements File* option.
69+
If you have the *Install Project* option enabled, we will run ``setup.py
70+
install`` on your package, installing it into a virtual environment. You can
71+
also define additional packages to install with the *Requirements File* option.
6572

66-
When we build your documentation, we run `sphinx-build -b html . _build/html`, where `html` would be replaced with the correct backend. We also create man pages and pdf's automatically based on your project.
73+
When we build your documentation, we run `sphinx-build -b html . _build/html`,
74+
where `html` would be replaced with the correct backend. We also create man
75+
pages and pdf's automatically based on your project.
6776

68-
Then these files are copied across to our application servers from the build server. Once on the application servers, they are served from nginx.
77+
Then these files are copied across to our application servers from the build
78+
server. Once on the application servers, they are served from nginx.
6979

7080
An example in code:
7181

@@ -84,16 +94,20 @@ Builder Responsibility
8494
----------------------
8595

8696
Builders have a very specific job.
87-
They take the updated source code and generate the correct artifacts.
88-
The code lives in ``self.version.project.checkout_path(self.version.slug)``.
89-
The artifacts should end up in ``self.version.project.artifact_path(version=self.version.slug, type=self.type)``
90-
Where ``type`` is the name of your builder.
91-
All files that end up in the artifact directory should be in their final form.
97+
They take the updated source code and generate the correct artifacts. The code
98+
lives in ``self.version.project.checkout_path(self.version.slug)``.
99+
The artifacts should end up in
100+
``self.version.project.artifact_path(version=self.version.slug, type=self.type)``
101+
Where ``type`` is the name of your builder. All files that end up in the
102+
artifact directory should be in their final form.
92103

93104
Packages installed in the build environment
94105
-------------------------------------------
95106

96-
The build server does have a select number of C libraries installed, because they are used across a wide array of python projects. We can't install every C library out there, but we try and support the major ones. We currently have the following libraries installed:
107+
The build server does have a select number of C libraries installed, because
108+
they are used across a wide array of python projects. We can't install every C
109+
library out there, but we try and support the major ones. We currently have the
110+
following libraries installed:
97111

98112
* doxygen
99113
* LaTeX (texlive-full)
@@ -106,11 +120,17 @@ The build server does have a select number of C libraries installed, because the
106120
Writing your own builder
107121
------------------------
108122

109-
.. note:: Builds happen on a server using only the RTD Public API. There is no reason that you couldn't build your own independent builder that wrote into the RTD namespace. The only thing that is currently unsupported there is a saner way than uploading the processed files as a zip.
123+
.. note:: Builds happen on a server using only the RTD Public API. There is no
124+
reason that you couldn't build your own independent builder that wrote into
125+
the RTD namespace. The only thing that is currently unsupported there is a
126+
saner way than uploading the processed files as a zip.
110127

111-
The documentation build system in RTD is made pluggable, so that you can build out your own backend. If you have a documentation format that isn't currently supported, you can add support by contributing a backend.
128+
The documentation build system in RTD is made pluggable, so that you can build
129+
out your own backend. If you have a documentation format that isn't currently
130+
supported, you can add support by contributing a backend.
112131

113-
The :doc:`api/doc_builder` API explains the higher level parts of the API that you need to implement. A basic run goes something like this::
132+
The :doc:`api/doc_builder` API explains the higher level parts of the API that
133+
you need to implement. A basic run goes something like this::
114134

115135
backend = get_backend(project.documentation_type)
116136
if force:
@@ -123,12 +143,17 @@ The :doc:`api/doc_builder` API explains the higher level parts of the API that y
123143
Deleting a stale or broken build environment
124144
--------------------------------------------
125145

126-
If you're having trouble getting your version to build, try wiping out the existing build/environment files. On your version list page ``/projects/[project]/versions`` there is a "Wipe" button that will remove all of the files associated with your documentation build, but not the documentation itself.
146+
If you're having trouble getting your version to build, try wiping out the
147+
existing build/environment files. On your version list page
148+
``/projects/[project]/versions`` there is a "Wipe" button that will remove all
149+
of the files associated with your documentation build, but not the
150+
documentation itself.
127151

128152
Build environment
129153
-----------------
130154

131-
The *Sphinx* and *Mkdocs* builders set the following RTD-specific environment variables when building your documentation:
155+
The *Sphinx* and *Mkdocs* builders set the following RTD-specific environment
156+
variables when building your documentation:
132157

133158
+-------------------------+--------------------------------------------------+----------------------+
134159
| Environment variable | Description | Example value |

0 commit comments

Comments
 (0)