Skip to content

Commit

Permalink
add index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
birchkwok committed Sep 16, 2024
1 parent 2fe51a4 commit 7df9a10
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<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/';
});
</script>
</head>
<body>
Redirecting to the latest version of the documentation...
</body>
</html>

0 comments on commit 7df9a10

Please sign in to comment.