diff --git a/README.md b/README.md index c2427d80..5a8cf235 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,10 @@ explanation, check out the [User Guide]. `http://localhost:3000` (port is changeable) and reloads the browser when a change occurs. +- `mdbook clean` + + Delete directory in which generated book is located. + ### As a library diff --git a/book-example/src/SUMMARY.md b/book-example/src/SUMMARY.md index cedb8949..8d7324a6 100644 --- a/book-example/src/SUMMARY.md +++ b/book-example/src/SUMMARY.md @@ -7,6 +7,7 @@ - [watch](cli/watch.md) - [serve](cli/serve.md) - [test](cli/test.md) + - [clean](cli/clean.md) - [Format](format/format.md) - [SUMMARY.md](format/summary.md) - [Configuration](format/config.md) diff --git a/book-example/src/cli/build.md b/book-example/src/cli/build.md index 0c296541..9da2eca1 100644 --- a/book-example/src/cli/build.md +++ b/book-example/src/cli/build.md @@ -14,8 +14,8 @@ convenience. Large books will therefore remain structured when rendered. #### Specify a directory -Like `init`, the `build` command can take a directory as argument to use instead of the -current working directory. +Like `init`, the `build` command can take a directory as an argument to use +instead of the current working directory. ```bash mdbook build path/to/book diff --git a/book-example/src/cli/clean.md b/book-example/src/cli/clean.md new file mode 100644 index 00000000..5fc85ed7 --- /dev/null +++ b/book-example/src/cli/clean.md @@ -0,0 +1,21 @@ +# The clean command + +The clean command is used to delete the generated book and any other build +artifacts. + +```bash +mdbook clean +``` + +It will try to delete the built book. If a path is provided, it will be used. + +#### Specify a directory + +Like `init`, the `clean` command can take a directory as an argument to use +instead of the normal build directory. + +```bash +mdbook clean --dest-dir=path/to/book +``` + +`path/to/book` could be absolute or relative. \ No newline at end of file diff --git a/book-example/src/cli/serve.md b/book-example/src/cli/serve.md index 6cd7e534..43e6e8f1 100644 --- a/book-example/src/cli/serve.md +++ b/book-example/src/cli/serve.md @@ -6,8 +6,8 @@ This preferred by many for writing books with mdbook because it allows for you t #### Specify a directory -Like `watch`, `serve` can take a directory as argument to use instead of the -current working directory. +Like `watch`, `serve` can take a directory as an argument to use instead of +the current working directory. ```bash mdbook serve path/to/book diff --git a/book-example/src/cli/watch.md b/book-example/src/cli/watch.md index 65fa86b3..a0cda04e 100644 --- a/book-example/src/cli/watch.md +++ b/book-example/src/cli/watch.md @@ -5,8 +5,8 @@ You could repeatedly issue `mdbook build` every time a file is changed. But usin #### Specify a directory -Like `init` and `build`, `watch` can take a directory as argument to use instead of the -current working directory. +Like `init` and `build`, `watch` can take a directory as an argument to use +instead of the current working directory. ```bash mdbook watch path/to/book