From dab1ead5faeeba7b3c085cc3de22b38677150120 Mon Sep 17 00:00:00 2001 From: Alex Crichton <alex@alexcrichton.com> Date: Thu, 17 Sep 2015 09:52:21 -0700 Subject: [PATCH] Auto-generate an index --- ci/dox.sh | 10 ++++++++-- ci/landing-page-footer.html | 7 +++++++ ci/landing-page-head.html | 4 ++++ ci/landing-page.html | 1 - 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 ci/landing-page-footer.html create mode 100644 ci/landing-page-head.html delete mode 100644 ci/landing-page.html diff --git a/ci/dox.sh b/ci/dox.sh index 615aacdd..5450088c 100644 --- a/ci/dox.sh +++ b/ci/dox.sh @@ -5,10 +5,16 @@ set -e rm -rf target/doc mkdir -p target/doc +cp ci/landing-page-head.html target/doc/index.html + doc() { local _target=$1 echo documenting $_target - rustdoc -o target/doc/$_target --target $_target src/lib.rs --cfg dox + rustdoc -o target/doc/$_target --target $_target src/lib.rs --cfg dox \ + --crate-name libc + + echo "<li><a href="$_target/libc/index.html">$_target</a></li>" \ + >> target/doc/index.html } doc x86_64-unknown-linux-gnu @@ -25,7 +31,7 @@ doc mips-unknown-linux-gnu doc arm-linux-androideabi doc x86_64-unknown-linux-musl -cp ci/landing-page.html target/doc/index.html +cat ci/landing-page-footer.html >> target/doc/index.html if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "autotest" ]; then pip install ghp-import --user $USER diff --git a/ci/landing-page-footer.html b/ci/landing-page-footer.html new file mode 100644 index 00000000..fc69fa88 --- /dev/null +++ b/ci/landing-page-footer.html @@ -0,0 +1,7 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + </head> + <body> + <ul> diff --git a/ci/landing-page-head.html b/ci/landing-page-head.html new file mode 100644 index 00000000..de3c63c0 --- /dev/null +++ b/ci/landing-page-head.html @@ -0,0 +1,4 @@ + </ul> + </body> +</html> + diff --git a/ci/landing-page.html b/ci/landing-page.html deleted file mode 100644 index 4effa19f..00000000 --- a/ci/landing-page.html +++ /dev/null @@ -1 +0,0 @@ -hello! -- GitLab