Skip to content

Commit cb6f228

Browse files
Merge pull request #510 from Michael-F-Bryan/book-json-warning
Added a warning if people use the book.json config file
2 parents 3964266 + 718d251 commit cb6f228

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/book/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ impl MDBook {
4747
let book_root = book_root.into();
4848
let config_location = book_root.join("book.toml");
4949

50+
// the book.json file is no longer used, so we should emit a warning to
51+
// let people know to migrate to book.toml
52+
if book_root.join("book.json").exists() {
53+
warn!("It appears you are still using book.json for configuration.");
54+
warn!("This format is no longer used, so you should migrate to the");
55+
warn!("book.toml format.");
56+
warn!("Check the user guide for migration information:");
57+
warn!("\thttps://rust-lang-nursery.github.io/mdBook/format/config.html");
58+
}
59+
5060
let config = if config_location.exists() {
5161
debug!("[*] Loading config from {}", config_location.display());
5262
Config::from_disk(&config_location)?

0 commit comments

Comments
 (0)