Skip to content

Commit

Permalink
doc: update index.html template
Browse files Browse the repository at this point in the history
While we wait for rust-lang/cargo#739 to get
resolved, we hardcode the rustdoc template in bin/doc so that we can
generate a nice index page for our docs. This hardcoded template has
diverged a bit from rustdoc; update it to accordingly.
  • Loading branch information
benesch committed Feb 21, 2020
1 parent 2093741 commit ffba49f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/doc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ cat > target/doc/index.html <<EOF
<!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]-->
<nav class="sidebar">
<div class="sidebar-menu">&#9776;</div>
<a href='index.html'><img src='rust-logo.png' alt='logo' width='100'></a>
<a href='index.html'><div class='logo-container'><img src='rust-logo.png' alt='logo'></div></a>
<p class='location'>Home</p>
<div class="sidebar-elems">
</div>
Expand Down Expand Up @@ -127,7 +127,7 @@ EOF
# links to the root of whatever crate you happen to be looking at.
cat >> target/doc/main.js <<EOF
;
var el = document.querySelector("img[alt=logo]").parentNode;
var el = document.querySelector("img[alt=logo]").closest("a");
if (el.href != "index.html") {
el.href = "../index.html";
}
Expand Down

0 comments on commit ffba49f

Please sign in to comment.