fix redirects and CNAME

This commit is contained in:
Jorge Aparicio 2019-09-15 21:40:40 +02:00
parent c14f7d1ce9
commit a593e49a3e
2 changed files with 11 additions and 4 deletions

View file

@ -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

View file

@ -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>