Exclude old book redirect stubs from search engines

This commit is contained in:
Kornel 2019-03-14 22:52:56 +00:00
parent bc44841ad2
commit 8b5a748d50
2 changed files with 4 additions and 2 deletions

View File

@ -331,7 +331,7 @@ fn invoke_rustdoc(
let path = builder.src.join("src/doc").join(markdown);
let favicon = builder.src.join("src/doc/favicon.inc");
let header = builder.src.join("src/doc/redirect.inc");
let footer = builder.src.join("src/doc/footer.inc");
let version_info = out.join("version_info.html");
@ -341,7 +341,7 @@ fn invoke_rustdoc(
cmd.arg("--html-after-content").arg(&footer)
.arg("--html-before-content").arg(&version_info)
.arg("--html-in-header").arg(&favicon)
.arg("--html-in-header").arg(&header)
.arg("--markdown-no-toc")
.arg("--markdown-playground-url")
.arg("https://play.rust-lang.org/")

2
src/doc/redirect.inc Normal file
View File

@ -0,0 +1,2 @@
<meta name="robots" content="noindex,follow">
<link rel="shortcut icon" href="https://www.rust-lang.org/favicon.ico">