@@ -7,6 +7,7 @@ Tarantool documentation source, published at https://www.tarantool.io/doc/.
7
7
## How to build Tarantool documentation using [ Docker] ( https://www.docker.com )
8
8
9
9
### Build docker image
10
+
10
11
``` bash
11
12
docker build -t tarantool-doc-builder .
12
13
```
@@ -38,7 +39,44 @@ Init make commands:
38
39
docker run --rm -it -v $( pwd) :/doc tarantool-doc-builder sh -c " cmake ."
39
40
```
40
41
41
- Run a required make command inside * tarantool-doc-builder* container:
42
+ Now you're ready to build and preview the documentation locally.
43
+
44
+ ### Build and run the documentation on your machine
45
+
46
+ When editing the documentation, you can set up a live-reload server.
47
+ It will build your documentation and serve it on [ 127.0.0.1:8000] ( http://127.0.0.1:8000 ) .
48
+ Every time you make changes in the source files, it will rebuild the docs
49
+ and refresh the browser page.
50
+
51
+ ``` bash
52
+ docker run --rm -it -p 8000:8000 -v $( pwd) :/doc tarantool-doc-builder sh -c " make autobuild"
53
+ ```
54
+
55
+ First build will take some time.
56
+ When it's done, open [ 127.0.0.1:8000] ( http://127.0.0.1:8000 ) in the browser.
57
+ Now when you make changes, they will be rebuilt in a few seconds,
58
+ and the browser tab with preview will reload automatically.
59
+
60
+ You can also build the docs manually with ` make html ` ,
61
+ and then serve them using python3 built-in server:
62
+ ``` bash
63
+ docker run --rm -it -v $( pwd) :/doc tarantool-doc-builder sh -c " make html"
64
+ docker run --rm -it -v $( pwd) :/doc tarantool-doc-builder sh -c " make html-ru"
65
+ python3 -m http.server --directory output/html
66
+ ```
67
+
68
+ or python2 built-in server:
69
+ ``` bash
70
+ cd output/html
71
+ python -m SimpleHTTPServer
72
+ ```
73
+
74
+ then go to [ localhost:8000] ( http://localhost:8000 ) in your browser.
75
+
76
+
77
+ There are other commands which can run
78
+ in the * tarantool-doc-builder* container:
79
+
42
80
``` bash
43
81
docker run --rm -it -v $( pwd) :/doc tarantool-doc-builder sh -c " make html"
44
82
docker run --rm -it -v $( pwd) :/doc tarantool-doc-builder sh -c " make html-ru"
@@ -55,19 +93,6 @@ docker run --rm -it -v $(pwd):/doc tarantool-doc-builder sh -c "make update-po"
55
93
docker run --rm -it -v $( pwd) :/doc tarantool-doc-builder sh -c " make update-po-force"
56
94
```
57
95
58
- ### Run documentation locally on your machine
59
- using python3 built-in server:
60
- ``` bash
61
- cd output/html
62
- python3 -m http.server
63
- ```
64
- or python2 built-in server:
65
- ``` bash
66
- cd output/html
67
- python -m SimpleHTTPServer
68
- ```
69
- then go to [ localhost:8000] ( http://localhost:8000 ) in your browser.
70
-
71
96
## Localization
72
97
73
98
Terms:
0 commit comments