-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update index.html to redirect to 0.1.2
- Loading branch information
1 parent
f00341f
commit 42cab5d
Showing
1 changed file
with
3 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta http-equiv="refresh" content="0; url=/0.1.2/"> | ||
<title>Redirecting...</title> | ||
<script type="text/javascript"> | ||
fetch('/versions.json') | ||
.then(response => response.json()) | ||
.then(versions => { | ||
// 获取最新版本 | ||
const latestVersion = versions[versions.length - 1].version; | ||
// 重定向到最新版本 | ||
window.location.href = `/${latestVersion}/`; | ||
}) | ||
.catch(error => { | ||
console.error('Error fetching versions:', error); | ||
// 如果获取版本失败,可以设置默认重定向 | ||
window.location.href = '/v1.0/'; | ||
}); | ||
window.location.href = "/0.1.2/" | ||
</script> | ||
</head> | ||
<body> | ||
Redirecting to the latest version of the documentation... | ||
If you are not redirected, <a href="/0.1.2/">click here</a>. | ||
</body> | ||
</html> |