The watch command
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.
Specify a directory
watch can take a directory as argument to use instead of the
current working directory.
mdbook watch path/to/book
When you use the
-o) option, mdbook will open the rendered book in
your default web browser.
-d) option allows you to change the output directory for your book.
watch command has not gotten a lot of testing yet, there could be some rough edges. If you discover a problem, please report it on Github