Place *all* rustdoc output in doc/{crate}
This commit is contained in:
parent
f6e28d1f45
commit
83499d1a89
|
@ -21,7 +21,8 @@ RUSTPKG_INPUTS := $(wildcard $(S)src/librustpkg/*.rs)
|
||||||
|
|
||||||
# Rustdoc, the documentation tool
|
# Rustdoc, the documentation tool
|
||||||
RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rs
|
RUSTDOC_LIB := $(S)src/librustdoc/rustdoc.rs
|
||||||
RUSTDOC_INPUTS := $(wildcard $(S)src/librustdoc/*.rs)
|
RUSTDOC_INPUTS := $(wildcard $(addprefix $(S)src/librustdoc/, \
|
||||||
|
*.rs */*.rs */*/*.rs))
|
||||||
|
|
||||||
# Rusti, the JIT REPL
|
# Rusti, the JIT REPL
|
||||||
RUSTI_LIB := $(S)src/librusti/rusti.rs
|
RUSTI_LIB := $(S)src/librusti/rusti.rs
|
||||||
|
|
|
@ -36,7 +36,7 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
|
||||||
|
|
||||||
<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400'
|
<link href='http://fonts.googleapis.com/css?family=Oswald:700|Inconsolata:400'
|
||||||
rel='stylesheet' type='text/css'>
|
rel='stylesheet' type='text/css'>
|
||||||
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}main.css\">
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"{root_path}{crate}/main.css\">
|
||||||
|
|
||||||
{favicon, select, none{} other{
|
{favicon, select, none{} other{
|
||||||
<link rel=\"icon\" href=\"#\" sizes=\"16x16\"
|
<link rel=\"icon\" href=\"#\" sizes=\"16x16\"
|
||||||
|
@ -52,7 +52,7 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
|
||||||
|
|
||||||
<section class=\"sidebar\">
|
<section class=\"sidebar\">
|
||||||
{logo, select, none{} other{
|
{logo, select, none{} other{
|
||||||
<a href='{root_path}index.html'><img src='#' alt=''/></a>
|
<a href='{root_path}{crate}/index.html'><img src='#' alt=''/></a>
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{sidebar}
|
{sidebar}
|
||||||
|
@ -73,9 +73,9 @@ pub fn render<T: fmt::Default, S: fmt::Default>(
|
||||||
<script>
|
<script>
|
||||||
var rootPath = \"{root_path}\";
|
var rootPath = \"{root_path}\";
|
||||||
</script>
|
</script>
|
||||||
<script src=\"{root_path}jquery.js\"></script>
|
<script src=\"{root_path}{crate}/jquery.js\"></script>
|
||||||
<script src=\"{root_path}{crate}/search-index.js\"></script>
|
<script src=\"{root_path}{crate}/search-index.js\"></script>
|
||||||
<script src=\"{root_path}main.js\"></script>
|
<script src=\"{root_path}{crate}/main.js\"></script>
|
||||||
|
|
||||||
<div id=\"help\" class=\"hidden\">
|
<div id=\"help\" class=\"hidden\">
|
||||||
<div class=\"shortcuts\">
|
<div class=\"shortcuts\">
|
||||||
|
|
|
@ -128,20 +128,15 @@ pub fn run(mut crate: clean::Crate, dst: Path) {
|
||||||
crate = cache.fold_crate(crate);
|
crate = cache.fold_crate(crate);
|
||||||
|
|
||||||
// Add all the static files
|
// Add all the static files
|
||||||
write(cx.dst.push("jquery.js"), include_str!("static/jquery-2.0.3.min.js"));
|
let dst = cx.dst.push(crate.name);
|
||||||
write(cx.dst.push("main.js"), include_str!("static/main.js"));
|
mkdir(&dst);
|
||||||
write(cx.dst.push("main.css"), include_str!("static/main.css"));
|
write(dst.push("jquery.js"), include_str!("static/jquery-2.0.3.min.js"));
|
||||||
write(cx.dst.push("normalize.css"), include_str!("static/normalize.css"));
|
write(dst.push("main.js"), include_str!("static/main.js"));
|
||||||
write(cx.dst.push("index.html"), format!("
|
write(dst.push("main.css"), include_str!("static/main.css"));
|
||||||
<DOCTYPE html><html><head>
|
write(dst.push("normalize.css"), include_str!("static/normalize.css"));
|
||||||
<meta http-equiv='refresh'
|
|
||||||
content=\"0; url={}/index.html\">
|
|
||||||
</head><body></body></html>
|
|
||||||
", crate.name));
|
|
||||||
|
|
||||||
{
|
{
|
||||||
mkdir(&cx.dst.push(crate.name));
|
let dst = dst.push("search-index.js");
|
||||||
let dst = cx.dst.push(crate.name).push("search-index.js");
|
|
||||||
let mut w = BufferedWriter::new(dst.open_writer(io::CreateOrTruncate));
|
let mut w = BufferedWriter::new(dst.open_writer(io::CreateOrTruncate));
|
||||||
let w = &mut w as &mut io::Writer;
|
let w = &mut w as &mut io::Writer;
|
||||||
write!(w, "var searchIndex = [");
|
write!(w, "var searchIndex = [");
|
||||||
|
|
Loading…
Reference in New Issue