Skip to content

Commit 1af11e9

Browse files
authored
chore(demo): Add GH pages support (#29)
1 parent 9200ad7 commit 1af11e9

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

demo/src/app.html

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8" />
5-
<meta name="viewport" content="width=device-width, initial-scale=1" />
6-
%sveltekit.head%
7-
</head>
8-
<body data-sveltekit-preload-data="hover">
9-
<div style="display: contents">%sveltekit.body%</div>
10-
</body>
11-
</html>
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<script type="text/javascript">
8+
(function () {
9+
var redirect = sessionStorage.redirect;
10+
delete sessionStorage.redirect;
11+
if (redirect && redirect != location.href) {
12+
history.replaceState(null, null, redirect);
13+
}
14+
})();
15+
</script>
16+
%sveltekit.head%
17+
</head>
18+
19+
<body data-sveltekit-preload-data="hover">
20+
<div style="display: contents">%sveltekit.body%</div>
21+
</body>
22+
23+
</html>

demo/static/.nojekyll

Whitespace-only changes.

demo/static/404.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<script>
6+
sessionStorage.redirect = location.href;
7+
</script>
8+
<meta http-equiv="refresh" content="0;URL='/svelte-router-kit'">
9+
</head>
10+
11+
<body>
12+
</body>
13+
14+
</html>

0 commit comments

Comments
 (0)