Add 404 redirect handling and GitHub Pages workflow configuration

This commit is contained in:
Supertiger
2025-08-01 18:05:52 +01:00
parent 382f61a615
commit 91efade9ec
3 changed files with 56 additions and 0 deletions

14
public/404.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<script>
sessionStorage.redirect = location.href;
const projectPages = true; // If you're using the base .github.io domain without a path (i.e. <name>.github.io is your home page), set this to false
const l = window.location;
const repo = projectPages ? "/" + l.pathname.split("/")[1] : "";
l.replace(
l.protocol + "//" + l.hostname + (l.port ? ":" + l.port : "") + repo
);
</script>
</head>
</html>