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

View File

@@ -12,5 +12,15 @@
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script>
// Redirects user from 404
(function () {
var redirect = sessionStorage.redirect;
delete sessionStorage.redirect;
if (redirect && redirect != location.href) {
history.replaceState(null, null, redirect);
}
})();
</script>
</body>
</html>