Rollup merge of #47423 - est31:rustbook_checking, r=alexcrichton
Check for deadlinks from the summary during book generation Previously, any deadlinks from a book's SUMMARY.md wouldn't cause any errors or warnings or similar but mdbook would simply create a page with blank content. This has kept bug #47394 hidden. It should have been detected back in the PR when those wrongly named files got added to the book. PR #47414 was one component of the solution. This change is a second line of defense for the unstable book and a first line of defense for any other book. We also update mdbook to the most recent version.
This commit is contained in:
commit
116fb72d3d
6
src/Cargo.lock
generated
6
src/Cargo.lock
generated
@ -1108,7 +1108,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "mdbook"
|
||||
version = "0.0.26"
|
||||
version = "0.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -1674,7 +1674,7 @@ name = "rustbook"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap 2.29.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mdbook 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mdbook 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2980,7 +2980,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
|
||||
"checksum markup5ever 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "047150a0e03b57e638fc45af33a0b63a0362305d5b9f92ecef81df472a4cceb0"
|
||||
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
|
||||
"checksum mdbook 0.0.26 (registry+https://github.com/rust-lang/crates.io-index)" = "8a1ac668292d1e5c7b1c6fd64f70d3a85105b8069a89558a0d67bdb2ff298ca1"
|
||||
"checksum mdbook 0.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "1ee8ba20c002000546681dc78d7f7e91fd35832058b1e2fdd492ca842bb6e9be"
|
||||
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
|
||||
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
|
||||
"checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4"
|
||||
|
@ -8,5 +8,5 @@ license = "MIT/Apache-2.0"
|
||||
clap = "2.25.0"
|
||||
|
||||
[dependencies.mdbook]
|
||||
version = "0.0.26"
|
||||
version = "0.0.28"
|
||||
default-features = false
|
||||
|
@ -52,12 +52,14 @@ fn main() {
|
||||
// Build command implementation
|
||||
pub fn build(args: &ArgMatches) -> Result<()> {
|
||||
let book_dir = get_book_dir(args);
|
||||
let book = MDBook::new(&book_dir).read_config()?;
|
||||
let mut book = MDBook::new(&book_dir).read_config()?;
|
||||
|
||||
let mut book = match args.value_of("dest-dir") {
|
||||
Some(dest_dir) => book.with_destination(dest_dir),
|
||||
None => book,
|
||||
};
|
||||
// Set this to allow us to catch bugs in advance.
|
||||
book.config.build.create_missing = false;
|
||||
|
||||
if let Some(dest_dir) = args.value_of("dest-dir") {
|
||||
book.config.build.build_dir = PathBuf::from(dest_dir);
|
||||
}
|
||||
|
||||
book.build()?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user