Skip to content

Commit 861dabe

Browse files
committed
setup gh-pages
1 parent 96d65c3 commit 861dabe

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

404.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Page not found</title>
6+
<script>
7+
// 解析当前 URL 的路径部分
8+
var path = location.pathname;
9+
10+
// 重定向到首页,并通过 hash 将原路径传递给首页
11+
// 这里假设你的首页能够使用 JavaScript 读取 hash,并据此渲染对应的组件或页面
12+
document.location.href = '/#' + path;
13+
</script>
14+
</head>
15+
<body>
16+
<h1>Page Not Found</h1>
17+
<p>Redirecting to homepage...</p>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)