@@ -438,6 +438,8 @@ pub struct BuildConfig {
438
438
/// Should the default preprocessors always be used when they are
439
439
/// compatible with the renderer?
440
440
pub use_default_preprocessors : bool ,
441
+ /// Extra directories to trigger rebuild when watching/serving
442
+ pub extra_watch_dirs : Vec < PathBuf > ,
441
443
}
442
444
443
445
impl Default for BuildConfig {
@@ -446,6 +448,7 @@ impl Default for BuildConfig {
446
448
build_dir : PathBuf :: from ( "book" ) ,
447
449
create_missing : true ,
448
450
use_default_preprocessors : true ,
451
+ extra_watch_dirs : Vec :: new ( ) ,
449
452
}
450
453
}
451
454
}
@@ -527,10 +530,9 @@ pub struct HtmlConfig {
527
530
/// directly jumping to editing the currently viewed page.
528
531
/// Contains {path} that is replaced with chapter source file path
529
532
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)
534
536
///
535
537
/// This config item *should not be edited* by the end user.
536
538
#[ doc( hidden) ]
@@ -772,6 +774,7 @@ mod tests {
772
774
build_dir : PathBuf :: from ( "outputs" ) ,
773
775
create_missing : false ,
774
776
use_default_preprocessors : true ,
777
+ extra_watch_dirs : Vec :: new ( ) ,
775
778
} ;
776
779
let rust_should_be = RustConfig { edition : None } ;
777
780
let playground_should_be = Playground {
@@ -982,6 +985,7 @@ mod tests {
982
985
build_dir : PathBuf :: from ( "my-book" ) ,
983
986
create_missing : true ,
984
987
use_default_preprocessors : true ,
988
+ extra_watch_dirs : Vec :: new ( ) ,
985
989
} ;
986
990
987
991
let html_should_be = HtmlConfig {
0 commit comments