1
1
Read the Docs Builder
2
2
=====================
3
3
4
- This module is the main building interface to Read the Docs.
5
- It has no explicit dependency on RTD code itself,
6
- and can be used outside of RTD to test your builds.
7
-
8
4
.. warning ::
9
- This code is still under active development and isn't considered
10
- stable. Please report bugs you find and contribute back if you are so
11
- inclined.
5
+ This repo is only used as a configuration parser for readthedocs.org builds,
6
+ and it's unsupported for other uses.
12
7
13
8
Install
14
9
-------
@@ -17,57 +12,14 @@ Install with pip::
17
12
18
13
pip install readthedocs-build
19
14
20
- CLI Use
21
- -------
22
-
23
- Running a build is simple::
24
-
25
- rtd-build
26
-
27
- This will search for all ``readthedocs.yml `` (or ``.readthedocs.yml ``) files
28
- below your current directory and will build your documentation.
29
-
30
- You can set a specific a directory where the built documentation should be
31
- stored::
32
-
33
- rtd-build --outdir=out_dir
34
-
35
- The documentation will then be placed in `out_dir/<name>/html/ `. Where `<name> `
36
- is the name configured in your `readthedocs.yml `. The default for ``--outdir ``
37
- is `_readthedocs_build `.
38
-
39
- Run `rtd-build --help ` for more information.
40
-
41
- The Build
42
- ---------
43
-
44
- Here is a list of steps that `rtd-build ` performs to built your documentation.
45
- All these steps are performed for each individual section in your
46
- ``readthedocs.yml `` configs.
47
-
48
- - it creates a new virtual environment with ``virtualenv ``
49
- - it installs the builder's dependencies into the virtualenv, for example
50
- ``Sphinx ``
51
- - it runs the build command (e.g. ``sphinx-build ``) on your documentation and
52
- puts the output into the directory specified with ``--outdir ``.
53
- - it removes the virtualenv
54
-
55
15
Library Use
56
16
-----------
57
17
58
- An example use of this library is:
59
-
60
- .. code-block :: python
18
+ Example uses of this library is:
61
19
62
- import os
63
- from readthedocs_build.build import build
20
+ * https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/doc_builder/config.py#L8-L9
21
+ * https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/projects/tasks.py#L27
64
22
65
- build([{
66
- ' output_base' : os.path.abspath(' outdir' ),
67
- ' name' : ' docs' ,
68
- ' type' : ' sphinx' ,
69
- ' base' : os.path.dirname(os.path.abspath(__file__ )),
70
- }])
71
23
72
24
Development
73
25
-----------
@@ -82,13 +34,3 @@ changes as you edit them in the code.
82
34
To run the tests::
83
35
84
36
tox
85
-
86
- Build Process
87
- -------------
88
-
89
- Read the Docs creates a full environment for your build. In your local
90
- environment, you can choose what portions of this environment to re-create.
91
- You can either use your existing environment with our builder code installed,
92
- or allow our builder to create a fully isolated environment for itself. A fully
93
- isolated environment is much closer to our production build environment for
94
- testing purposes.
0 commit comments