Skip to content

Commit ced88ff

Browse files
LokathorGankra
authored andcommitted
Better explain how to use mdbook
1 parent 341c221 commit ced88ff

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

README.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,24 @@ Building the Nomicon requires [mdBook]. To get it:
2929
$ cargo install mdbook
3030
```
3131

32-
### Building
32+
### `mdbook` usage
3333

34-
To build the Nomicon:
34+
To build the Nomicon use the `build` sub-command:
3535

3636
```bash
3737
$ mdbook build
3838
```
3939

40-
The output will be in the `book` subdirectory. To check it out, open it in
41-
your web browser.
40+
The output will be placed in the `book` subdirectory. To check it out, open the
41+
`index.html` file in your web browser. You can pass the `--open` flag to `mdbook
42+
build` and it'll open the index page (if the process is successful) just like with
43+
`cargo doc --open`:
4244

43-
_Firefox:_
4445
```bash
45-
$ firefox book/index.html # Linux
46-
$ open -a "Firefox" book/index.html # OS X
47-
$ Start-Process "firefox.exe" .\book\index.html # Windows (PowerShell)
48-
$ start firefox.exe .\book\index.html # Windows (Cmd)
46+
$ mdbook build --open
4947
```
5048

51-
_Chrome:_
52-
```bash
53-
$ google-chrome book/index.html # Linux
54-
$ open -a "Google Chrome" book/index.html # OS X
55-
$ Start-Process "chrome.exe" .\book\index.html # Windows (PowerShell)
56-
$ start chrome.exe .\book\index.html # Windows (Cmd)
57-
```
58-
59-
To run the tests:
49+
There is also a `test` sub-command to test all code samples contained in the book:
6050

6151
```bash
6252
$ mdbook test

0 commit comments

Comments
 (0)