Skip to content

Commit a593e49

Browse files
committed
fix redirects and CNAME
1 parent c14f7d1 commit a593e49

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

ci/after-success.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ main() {
1111

1212
# build latest docs
1313
cp -r target/doc $td/api
14+
sed 's|URL|rtfm/index.html|g' redirect.html > $td/api/index.html
15+
1416
mkdir $td/book/
15-
cp redirect.html $td/index.html
17+
sed 's|URL|book/en|g' redirect.html > $td/index.html
1618
for lang in ${langs[@]}; do
1719
( cd book/$lang && mdbook build )
1820
cp -r book/$lang/book $td/book/$lang
@@ -30,16 +32,21 @@ main() {
3032
pushd $src
3133
cargo doc || cargo doc --features timer-queue
3234
cp -r target/doc $td/$prefix/api
35+
sed 's|URL|rtfm/index.html|g' redirect.html > $td/$prefix/api/index.html
3336
for lang in ${langs[@]}; do
3437
( cd book/$lang && mdbook build )
3538
cp -r book/$lang/book $td/$prefix/book/$lang
3639
cp LICENSE-* $td/$prefix/book/$lang/
3740
done
41+
sed 's|URL|book/en|g' redirect.html > $td/$prefix/index.html
3842
popd
3943

4044
rm -rf $src
4145
done
4246

47+
# forward CNAME file
48+
cp CNAME $td/
49+
4350
mkdir ghp-import
4451
curl -Ls https://github.com/davisp/ghp-import/archive/master.tar.gz |
4552
tar --strip-components 1 -C ghp-import -xz

redirect.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<html lang="en-US">
44
<head>
55
<meta charset="UTF-8">
6-
<meta http-equiv="refresh" content="0; url=https://rtfm-rs.github.io/cortex-m-rtfm/book/en/">
6+
<meta http-equiv="refresh" content="0; url=URL">
77
<script type="text/javascript">
8-
window.location.href = "https://rtfm-rs.github.io/cortex-m-rtfm/book/en/"
8+
window.location.href = "URL"
99
</script>
1010
<title>Page Redirection</title>
1111
</head>
1212
<body>
1313
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
14-
If you are not redirected automatically, follow this <a href='https://rtfm-rs.github.io/cortex-m-rtfm/book/en/'>link to example</a>.
14+
If you are not redirected automatically, follow this <a href='URL'>link</a>.
1515
</body>
1616
</html>

0 commit comments

Comments
 (0)