1
1
Building the Documentation
2
- --------------------------
2
+ ==========================
3
3
4
- First `install Sphinx `_ and `install enchant `_ (e.g. ``sudo apt-get install enchant ``),
5
- then download the requirements:
4
+ We build the documentation with Sphinx. You could install it on your system or use Docker.
5
+
6
+
7
+ Install Sphinx
8
+ --------------
9
+
10
+
11
+ Install on local machine
12
+ ~~~~~~~~~~~~~~~~~~~~~~~~
13
+
14
+ The installation for Sphinx differs between system. See `Sphinx installation page `_ for details. When Sphinx is
15
+ installed you need to `install enchant `_ (e.g. ``sudo apt-get install enchant ``).
16
+
17
+
18
+ Using Docker
19
+ ~~~~~~~~~~~~
20
+
21
+ If you are using docker. Run the following commands from the repository root.
22
+
23
+ .. code-block :: bash
24
+
25
+ $ docker run --rm -it -v " $PWD " :/doc phphttp/documentation
26
+ $ # You are now in the docker image
27
+ $ make html
28
+ $ make spelling
29
+
30
+ Alternatively you can run the commands directly from the host
31
+ without entering the container shell:
32
+
33
+ .. code-block :: bash
34
+
35
+ $ docker run --rm -t -v " $PWD " :/doc phphttp/documentation make html
36
+ $ docker run --rm -t -v " $PWD " :/doc phphttp/documentation make spelling
37
+
38
+ .. warning ::
39
+
40
+ The Docker container runs with `root ` user by default
41
+ which means the owner of the generated files will be `root `
42
+ on the host too.
43
+
44
+
45
+ Build documentation
46
+ -------------------
47
+
48
+ Before we can build the documentation we have to make sure to install all requirements.
6
49
7
50
.. code-block :: bash
8
51
@@ -15,6 +58,6 @@ To build the docs:
15
58
$ make html
16
59
$ make spelling
17
60
18
- .. _ install Sphinx : http://sphinx-doc.org/latest/install.html
61
+ .. _ Sphinx installation page : http://sphinx-doc.org/latest/install.html
19
62
.. _install enchant : http://www.abisource.com/projects/enchant/
20
63
0 commit comments