Skip to content

Commit 892ddc9

Browse files
committed
Updates
1 parent 094500b commit 892ddc9

File tree

7 files changed

+25
-35
lines changed

7 files changed

+25
-35
lines changed

404.html

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,24 @@
44
<meta charset="utf-8">
55
<title>Redirecting...</title>
66
<script type="text/javascript">
7-
// Single Page Apps for GitHub Pages
8-
// MIT License
9-
// https://github.com/rafgraph/spa-github-pages
10-
// This script takes the current url and converts the path and query
11-
// string into just a query string, and then redirects the browser
12-
// to the new url with only a query string and hash fragment,
13-
// e.g. https://www.foo.tld/one/two?a=b&c=d#qwe, becomes
14-
// https://www.foo.tld/?/one/two&a=b~and~c=d#qwe
15-
// Note: this 404.html file must be at least 512 bytes for it to work
16-
// with Internet Explorer (it is currently > 512 bytes)
7+
// Single Page Apps for GitHub Pages
8+
// MIT License
9+
// https://github.com/rafgraph/spa-github-pages
10+
// This script takes the current URL and converts the path and query
11+
// string into just a query string, and then redirects the browser
12+
// to the new URL with the query string and hash fragment, but no
13+
// path, to load the single page app's index.html root.
14+
(function(){
15+
var path = window.location.pathname;
16+
var query = window.location.search;
17+
var fragment = window.location.hash;
1718

18-
// If you're creating a Project Pages site and NOT using a custom domain,
19-
// then set pathSegmentsToKeep to 1 (enterprise users may need to set it to > 1).
20-
// This way the code will only replace the route part of the path, and not
21-
// the real directory in which the app resides, for example:
22-
// https://username.github.io/repo-name/one/two?a=b&c=d#qwe becomes
23-
// https://username.github.io/repo-name/?/one/two&a=b~and~c=d#qwe
24-
// Otherwise, leave pathSegmentsToKeep as 0.
25-
var pathSegmentsToKeep = 0;
26-
27-
var l = window.location;
28-
l.replace(
29-
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
30-
l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
31-
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
32-
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
33-
l.hash
34-
);
19+
// Only redirect if not already on index.html and not a direct file request
20+
if (path !== '/index.html' && !path.endsWith('.html')) {
21+
window.history.replaceState(null, null, path + query + fragment);
22+
window.location.replace('/index.html');
23+
}
24+
})();
3525
</script>
3626
</head>
3727
<body>

asset-manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.8cf62888.css",
4-
"main.js": "/static/js/main.049113d0.js",
4+
"main.js": "/static/js/main.6a131451.js",
55
"static/js/453.33f95396.chunk.js": "/static/js/453.33f95396.chunk.js",
66
"index.html": "/index.html",
77
"main.8cf62888.css.map": "/static/css/main.8cf62888.css.map",
8-
"main.049113d0.js.map": "/static/js/main.049113d0.js.map",
8+
"main.6a131451.js.map": "/static/js/main.6a131451.js.map",
99
"453.33f95396.chunk.js.map": "/static/js/453.33f95396.chunk.js.map"
1010
},
1111
"entrypoints": [
1212
"static/css/main.8cf62888.css",
13-
"static/js/main.049113d0.js"
13+
"static/js/main.6a131451.js"
1414
]
1515
}

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en" class="dark"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="codex by fezcode..."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet"><title>fezcodex</title><script defer="defer" src="/static/js/main.049113d0.js"></script><link href="/static/css/main.8cf62888.css" rel="stylesheet"></head><body class="bg-gray-950"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1+
<!doctype html><html lang="en" class="dark"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><link rel="icon" type="image/svg+xml" href="/favicon.svg"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="codex by fezcode..."/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap" rel="stylesheet"><title>fezcodex</title><script defer="defer" src="/static/js/main.6a131451.js"></script><link href="/static/css/main.8cf62888.css" rel="stylesheet"></head><body class="bg-gray-950"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

static/js/main.049113d0.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/main.6a131451.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)