Skip to content

Commit

Permalink
setup gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
dxu104 committed Apr 28, 2024
1 parent 96d65c3 commit 861dabe
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page not found</title>
<script>
// 解析当前 URL 的路径部分
var path = location.pathname;

// 重定向到首页,并通过 hash 将原路径传递给首页
// 这里假设你的首页能够使用 JavaScript 读取 hash,并据此渲染对应的组件或页面
document.location.href = '/#' + path;
</script>
</head>
<body>
<h1>Page Not Found</h1>
<p>Redirecting to homepage...</p>
</body>
</html>

0 comments on commit 861dabe

Please sign in to comment.