@@ -29,31 +29,31 @@ $ cargo install mdbook
29
29
30
30
### Building
31
31
32
- To build the book, do this:
33
-
32
+ The most straight-forward way to build and view the book locally is to use the following command:
34
33
``` bash
35
- $ mdbook build
34
+ $ mdbook serve
36
35
```
37
36
38
- The output will be in the ` book ` subdirectory. To check it out, open it in
39
- your web browser.
37
+ This serves the book at http://localhost:3000 , and rebuilds it on changes.
38
+ You can now view the book in your web browser. If you make changes to the book's source code,
39
+ you should only need to refresh your browser to see them.
40
40
41
41
_ Firefox:_
42
42
43
43
``` shell
44
- $ firefox book/index.html # Linux
45
- $ open -a " Firefox" book/index.html # OS X
46
- $ Start-Process " firefox.exe" . \b ook \i ndex.html # Windows (PowerShell)
47
- $ start firefox.exe . \b ook \i ndex.html # Windows (Cmd)
44
+ $ firefox http://localhost:3000 # Linux
45
+ $ open -a " Firefox" http://localhost:3000 # OS X
46
+ $ Start-Process " firefox.exe" http://localhost:3000 # Windows (PowerShell)
47
+ $ start firefox.exe http://localhost:3000 # Windows (Cmd)
48
48
```
49
49
50
50
_ Chrome:_
51
51
52
52
``` shell
53
- $ google-chrome book/index.html # Linux
54
- $ open -a " Google Chrome" book/index.html # OS X
55
- $ Start-Process " chrome.exe" . \b ook \i ndex.html # Windows (PowerShell)
56
- $ start chrome.exe . \b ook \i ndex.html # Windows (Cmd)
53
+ $ google-chrome http://localhost:3000 # Linux
54
+ $ open -a " Google Chrome" http://localhost:3000 # OS X
55
+ $ Start-Process " chrome.exe" http://localhost:3000 # Windows (PowerShell)
56
+ $ start chrome.exe http://localhost:3000 # Windows (Cmd)
57
57
```
58
58
59
59
To run the tests:
0 commit comments