Skip to content

Commit

Permalink
Add 404 for github pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
elarsaks committed Aug 3, 2023
1 parent d062249 commit 3b73f2b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bower_components
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
build

# Dependency directories
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "react-hooks",
"version": "0.1.0",
"private": true,
"homepage": "https://elarsaks.github.io/react-hooks/",
"homepage": "https://elarsaks.github.io/react-hooks",
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
17 changes: 17 additions & 0 deletions public/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>Redirecting...</title>
<script>
// Redirect to the main index.html file to handle client-side routing
window.location.replace("/index.html");
</script>
</head>

<body>
If you are not redirected automatically, click <a href="/index.html">here</a>.
</body>

</html>

0 comments on commit 3b73f2b

Please sign in to comment.