@@ -438,6 +438,8 @@ pub struct BuildConfig {
438438 /// Should the default preprocessors always be used when they are
439439 /// compatible with the renderer?
440440 pub use_default_preprocessors : bool ,
441+ /// Extra directories to trigger rebuild when watching/serving
442+ pub extra_watch_dirs : Vec < PathBuf > ,
441443}
442444
443445impl Default for BuildConfig {
@@ -446,6 +448,7 @@ impl Default for BuildConfig {
446448 build_dir : PathBuf :: from ( "book" ) ,
447449 create_missing : true ,
448450 use_default_preprocessors : true ,
451+ extra_watch_dirs : Vec :: new ( ) ,
449452 }
450453 }
451454}
@@ -527,10 +530,9 @@ pub struct HtmlConfig {
527530 /// directly jumping to editing the currently viewed page.
528531 /// Contains {path} that is replaced with chapter source file path
529532 pub edit_url_template : Option < String > ,
530- /// Endpoint of websocket, for livereload usage. Value loaded from .toml file
531- /// is ignored, because our code overrides this field with the value [`LIVE_RELOAD_ENDPOINT`]
532- ///
533- /// [`LIVE_RELOAD_ENDPOINT`]: cmd::serve::LIVE_RELOAD_ENDPOINT
533+ /// Endpoint of websocket, for livereload usage. Value loaded from .toml
534+ /// file is ignored, because our code overrides this field with an
535+ /// internal value (`LIVE_RELOAD_ENDPOINT)
534536 ///
535537 /// This config item *should not be edited* by the end user.
536538 #[ doc( hidden) ]
@@ -772,6 +774,7 @@ mod tests {
772774 build_dir : PathBuf :: from ( "outputs" ) ,
773775 create_missing : false ,
774776 use_default_preprocessors : true ,
777+ extra_watch_dirs : Vec :: new ( ) ,
775778 } ;
776779 let rust_should_be = RustConfig { edition : None } ;
777780 let playground_should_be = Playground {
@@ -982,6 +985,7 @@ mod tests {
982985 build_dir : PathBuf :: from ( "my-book" ) ,
983986 create_missing : true ,
984987 use_default_preprocessors : true ,
988+ extra_watch_dirs : Vec :: new ( ) ,
985989 } ;
986990
987991 let html_should_be = HtmlConfig {
0 commit comments