From a593e49a3ec6736065333efc0254ee4c44eaa45d Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 15 Sep 2019 21:40:40 +0200 Subject: [PATCH] fix redirects and CNAME --- ci/after-success.sh | 9 ++++++++- redirect.html | 6 +++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ci/after-success.sh b/ci/after-success.sh index 3aaa8348f3..6deea8688b 100644 --- a/ci/after-success.sh +++ b/ci/after-success.sh @@ -11,8 +11,10 @@ main() { # build latest docs cp -r target/doc $td/api + sed 's|URL|rtfm/index.html|g' redirect.html > $td/api/index.html + mkdir $td/book/ - cp redirect.html $td/index.html + sed 's|URL|book/en|g' redirect.html > $td/index.html for lang in ${langs[@]}; do ( cd book/$lang && mdbook build ) cp -r book/$lang/book $td/book/$lang @@ -30,16 +32,21 @@ main() { pushd $src cargo doc || cargo doc --features timer-queue cp -r target/doc $td/$prefix/api + sed 's|URL|rtfm/index.html|g' redirect.html > $td/$prefix/api/index.html for lang in ${langs[@]}; do ( cd book/$lang && mdbook build ) cp -r book/$lang/book $td/$prefix/book/$lang cp LICENSE-* $td/$prefix/book/$lang/ done + sed 's|URL|book/en|g' redirect.html > $td/$prefix/index.html popd rm -rf $src done + # forward CNAME file + cp CNAME $td/ + mkdir ghp-import curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz | tar --strip-components 1 -C ghp-import -xz diff --git a/redirect.html b/redirect.html index 58f1a72f22..b832e0b12f 100644 --- a/redirect.html +++ b/redirect.html @@ -3,14 +3,14 @@ - + Page Redirection - If you are not redirected automatically, follow this link to example. + If you are not redirected automatically, follow this link.