Skip to content

Commit 0695136

Browse files
authored
Merge pull request #3 from neersighted/seamless-redirects
Implement seamless redirects through a python script
2 parents a957ed4 + 40862c2 commit 0695136

File tree

102 files changed

+1142
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1142
-6
lines changed

generate_redirects.py

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Generates redirects for rust-clippy, based on versions.json.
4+
The rust-clippy repo must be on the gh-pages branch at ../rust-clippy.
5+
"""
6+
7+
from pathlib import Path
8+
import json
9+
10+
TEMPLATE = """
11+
<!DOCTYPE html>
12+
<meta charset="utf-8">
13+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/{version}</title>
14+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/{version}/">
15+
<noscript>
16+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/{version}/">
17+
</noscript>
18+
<script>
19+
window.location.replace("https://rust-lang.github.io/rust-clippy/{version}/" + window.location.hash)
20+
</script>
21+
"""
22+
23+
CLIPPY_REDIRECTS = Path('./rust-clippy')
24+
CLIPPY_REPO = Path('../rust-clippy')
25+
26+
with (CLIPPY_REPO / 'versions.json').open() as versions:
27+
for version in json.load(versions):
28+
version_dir = CLIPPY_REDIRECTS / version
29+
version_file = version_dir / 'index.html'
30+
31+
version_dir.mkdir(parents=True, exist_ok=True)
32+
with version_file.open('wt') as redirect:
33+
redirect.write(TEMPLATE.format(version=version))
34+
35+
print("Wrote", version_file)

rust-clippy/0.0.124/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/0.0.124</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/0.0.124/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/0.0.124/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/0.0.124/" + window.location.hash)
11+
</script>

rust-clippy/0.0.125/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/0.0.125</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/0.0.125/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/0.0.125/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/0.0.125/" + window.location.hash)
11+
</script>

rust-clippy/0.0.129/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/0.0.129</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/0.0.129/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/0.0.129/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/0.0.129/" + window.location.hash)
11+
</script>

rust-clippy/0.0.136/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/0.0.136</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/0.0.136/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/0.0.136/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/0.0.136/" + window.location.hash)
11+
</script>

rust-clippy/0.0.90/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/0.0.90</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/0.0.90/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/0.0.90/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/0.0.90/" + window.location.hash)
11+
</script>

rust-clippy/current/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/current</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/current/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/current/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/current/" + window.location.hash)
11+
</script>

rust-clippy/list/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/list</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/list/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/list/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/list/" + window.location.hash)
11+
</script>

rust-clippy/master/index.html

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
12
<!DOCTYPE html>
23
<meta charset="utf-8">
3-
<title>Redirecting to https://rust-lang.github.io/rust-clippy/</title>
4-
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/">
5-
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/master</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/master/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/master/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/master/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.100/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.100</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.100/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.100/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.100/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.101/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.101</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.101/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.101/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.101/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.102/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.102</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.102/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.102/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.102/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.103/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.103</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.103/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.103/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.103/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.104/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.104</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.104/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.104/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.104/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.105/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.105</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.105/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.105/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.105/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.106/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.106</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.106/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.106/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.106/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.108/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.108</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.108/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.108/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.108/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.109/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.109</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.109/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.109/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.109/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.114/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.114</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.114/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.114/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.114/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.116/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.116</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.116/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.116/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.116/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.118/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.118</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.118/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.118/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.118/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.121/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.121</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.121/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.121/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.121/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.130/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.130</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.130/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.130/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.130/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.131/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.131</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.131/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.131/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.131/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.137/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.137</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.137/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.137/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.137/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.138/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.138</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.138/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.138/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.138/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.140/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.140</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.140/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.140/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.140/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.142/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.142</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.142/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.142/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.142/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.145/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.145</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.145/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.145/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.145/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.147/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.147</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.147/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.147/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.147/" + window.location.hash)
11+
</script>

rust-clippy/v0.0.149/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
<!DOCTYPE html>
3+
<meta charset="utf-8">
4+
<title>Redirecting to https://rust-lang.github.io/rust-clippy/v0.0.149</title>
5+
<link rel="canonical" href="https://rust-lang.github.io/rust-clippy/v0.0.149/">
6+
<noscript>
7+
<meta http-equiv="refresh" content="0; URL=https://rust-lang.github.io/rust-clippy/v0.0.149/">
8+
</noscript>
9+
<script>
10+
window.location.replace("https://rust-lang.github.io/rust-clippy/v0.0.149/" + window.location.hash)
11+
</script>

0 commit comments

Comments
 (0)