diff options
| author | steveklabnik <steve@steveklabnik.com> | 2017-03-07 16:07:55 -0500 |
|---|---|---|
| committer | steveklabnik <steve@steveklabnik.com> | 2017-03-20 10:10:15 -0400 |
| commit | 422330df2853695987f47cc8c5e25a36e232ea27 (patch) | |
| tree | ac609b390bc63b372d5413bafe967a934bb0e33d | |
| parent | 5f2f3d07dc74f0c66e1d9d9c09bcaa6e9db7780c (diff) | |
| download | rust-422330df2853695987f47cc8c5e25a36e232ea27.tar.gz rust-422330df2853695987f47cc8c5e25a36e232ea27.zip | |
Render redirect pages.
These pages will help people who have links to the older book.
| -rw-r--r-- | src/bootstrap/doc.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs index f94db1c26c1..26bcaf13456 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) { |
