From 422330df2853695987f47cc8c5e25a36e232ea27 Mon Sep 17 00:00:00 2001 From: steveklabnik Date: Tue, 7 Mar 2017 16:07:55 -0500 Subject: [PATCH] Render redirect pages. These pages will help people who have links to the older book. --- src/bootstrap/doc.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index f94db1c26c14..26bcaf134567 100644 --- a/src/bootstrap/doc.rs +++ b/src/bootstrap/doc.rs @@ -71,6 +71,15 @@ pub fn book(build: &Build, target: &str, name: &str) { // build the index page let index = format!("{}/index.md", name); invoke_rustdoc(build, target, &index); + + // build the redirect pages + for file in t!(fs::read_dir(build.src.join("src/doc/book/redirects"))) { + let file = t!(file); + let path = file.path(); + let path = path.to_str().unwrap(); + + invoke_rustdoc(build, target, path); + } } fn invoke_rustdoc(build: &Build, target: &str, markdown: &str) {