-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
52 lines (48 loc) · 2.35 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="canonical" href="https://ganymedelabs.github.io/react-vite-template/" />
<meta
name="description"
content="A React template built with Vite, featuring TypeScript, TailwindCSS, ESLint, Prettier, Docker, PWA (Workbox), and GitHub Pages deployment configured to support BrowserRouter."
/>
<title>React Vite Template</title>
<link rel="manifest" href="/manifest.json" />
<link rel="apple-touch-icon" sizes="180x180" href="/images/favicons/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicons/favicon-16x16.png" />
<meta name="theme-color" content="#000000" />
<script type="text/javascript">
/**
* Single Page Apps for GitHub Pages
* MIT License
* https://github.com/rafgraph/spa-github-pages
*
* This script handles redirects for single-page applications hosted on GitHub Pages.
* It checks for redirect information in the query string, decodes it into the correct URL,
* and updates the browser's history using window.history.replaceState(...) without causing
* the browser to reload the page. This ensures that when the single page app loads,
* the correct URL is available in the browser's history for proper routing.
*/
(function (l) {
if (l.search[1] === "/") {
var decoded = l.search
.slice(1)
.split("&")
.map(function (s) {
return s.replace(/~and~/g, "&");
})
.join("?");
window.history.replaceState(null, null, l.pathname.slice(0, -1) + decoded + l.hash);
}
})(window.location);
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>