diff options
author | 2019-09-15 19:41:50 +0000 | |
---|---|---|
committer | 2019-09-15 19:41:50 +0000 | |
commit | 7039f6291119db96c330f0f57a90cfc16d91cf04 (patch) | |
tree | 293ad9e4e449af287c11ee53e61de4aa8bd9f705 | |
parent | c14f7d1ce90ad4957801336cefe65b7fa82fe63f (diff) | |
parent | a593e49a3ec6736065333efc0254ee4c44eaa45d (diff) | |
download | rtic-7039f6291119db96c330f0f57a90cfc16d91cf04.tar.gz rtic-7039f6291119db96c330f0f57a90cfc16d91cf04.tar.zst rtic-7039f6291119db96c330f0f57a90cfc16d91cf04.zip |
Merge pull request #239 from japaric/fix-things
fix redirects and CNAME
Diffstat (limited to '')
-rw-r--r-- | ci/after-success.sh | 9 | ||||
-rw-r--r-- | redirect.html | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/ci/after-success.sh b/ci/after-success.sh index 3aaa8348..6deea868 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 58f1a72f..b832e0b1 100644 --- a/redirect.html +++ b/redirect.html @@ -3,14 +3,14 @@ <html lang="en-US"> <head> <meta charset="UTF-8"> - <meta http-equiv="refresh" content="0; url=https://rtfm-rs.github.io/cortex-m-rtfm/book/en/"> + <meta http-equiv="refresh" content="0; url=URL"> <script type="text/javascript"> - window.location.href = "https://rtfm-rs.github.io/cortex-m-rtfm/book/en/" + window.location.href = "URL" </script> <title>Page Redirection</title> </head> <body> <!-- Note: don't tell people to `click` the link, just tell them that it is a link. --> - If you are not redirected automatically, follow this <a href='https://rtfm-rs.github.io/cortex-m-rtfm/book/en/'>link to example</a>. + If you are not redirected automatically, follow this <a href='URL'>link</a>. </body> </html> |