Skip to content

Commit 73b46a0

Browse files
committed
Render redirect pages.
These pages will help people who have links to the older book.
1 parent 8372e11 commit 73b46a0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/bootstrap/doc.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ pub fn book(build: &Build, target: &str, name: &str) {
7171
// build the index page
7272
let index = format!("{}/index.md", name);
7373
invoke_rustdoc(build, target, &index);
74+
75+
// build the redirect pages
76+
for file in t!(fs::read_dir(build.src.join("src/doc/book/redirects"))) {
77+
let file = t!(file);
78+
let path = file.path();
79+
let path = path.to_str().unwrap();
80+
81+
invoke_rustdoc(build, target, path);
82+
}
7483
}
7584

7685
fn invoke_rustdoc(build: &Build, target: &str, markdown: &str) {

0 commit comments

Comments
 (0)