Skip to content

Commit

Permalink
Mention missing file creation in build/watch/serve's docs (rust-lang#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ISSOtm authored and blandger committed Jul 11, 2021
1 parent 5acd6ff commit 399d7ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion guide/src/cli/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ mdbook build
```

It will try to parse your `SUMMARY.md` file to understand the structure of your
book and fetch the corresponding files.
book and fetch the corresponding files. Note that files mentioned in `SUMMARY.md`
but not present will be created.

The rendered output will maintain the same directory structure as the source for
convenience. Large books will therefore remain structured when rendered.
Expand Down
3 changes: 2 additions & 1 deletion guide/src/cli/serve.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ mdbook serve
```

The `serve` command watches the book's `src` directory for
changes, rebuilding the book and refreshing clients for each change. A websocket
changes, rebuilding the book and refreshing clients for each change; this includes
re-creating deleted files still mentioned in `SUMMARY.md`! A websocket
connection is used to trigger the client-side refresh.

***Note:*** *The `serve` command is for testing a book's HTML output, and is not
Expand Down
3 changes: 2 additions & 1 deletion guide/src/cli/watch.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
The `watch` command is useful when you want your book to be rendered on every
file change. You could repeatedly issue `mdbook build` every time a file is
changed. But using `mdbook watch` once will watch your files and will trigger a
build automatically whenever you modify a file.
build automatically whenever you modify a file; this includes re-creating
deleted files still mentioned in `SUMMARY.md`!

#### Specify a directory

Expand Down

0 comments on commit 399d7ad

Please sign in to comment.