2015-07-30 17:59:08 +08:00
|
|
|
# The build command
|
|
|
|
|
|
|
|
The build command is used to render your book:
|
|
|
|
|
2015-12-30 06:59:08 +08:00
|
|
|
```bash
|
2015-07-30 17:59:08 +08:00
|
|
|
mdbook build
|
|
|
|
```
|
|
|
|
|
|
|
|
It will try to parse your `SUMMARY.md` file to understand the structure of your book
|
|
|
|
and fetch the corresponding files.
|
|
|
|
|
2015-09-25 04:19:14 +08:00
|
|
|
The rendered output will maintain the same directory structure as the source for
|
2015-07-30 17:59:08 +08:00
|
|
|
convenience. Large books will therefore remain structured when rendered.
|
|
|
|
|
|
|
|
#### Specify a directory
|
|
|
|
|
2015-09-25 04:19:14 +08:00
|
|
|
Like `init`, the `build` command can take a directory as argument to use instead of the
|
2015-07-30 17:59:08 +08:00
|
|
|
current working directory.
|
|
|
|
|
2015-12-30 06:59:08 +08:00
|
|
|
```bash
|
2015-07-30 17:59:08 +08:00
|
|
|
mdbook build path/to/book
|
|
|
|
```
|
|
|
|
|
|
|
|
-------------------
|
|
|
|
|
2015-08-06 21:24:34 +08:00
|
|
|
***note:*** *make sure to run the build command in the root directory and not in the source directory*
|