File tree 2 files changed +30
-0
lines changed
2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="utf-8 " />
5
+
6
+ < title > SeraphyBR's Blog</ title >
7
+
8
+ < script >
9
+ sessionStorage . redirect = location . href ;
10
+ </ script >
11
+
12
+ < meta http-equiv ="refresh " content ="0;URL='/' " />
13
+ </ head >
14
+
15
+ < body >
16
+ A little hack to make SPA routing "work" in github pages
17
+ </ body >
18
+ </ html >
Original file line number Diff line number Diff line change 23
23
/>
24
24
25
25
< link data-trunk rel ="copy-dir " href ="public/img " />
26
+ < link data-trunk rel ="copy-file " href ="404.html " />
26
27
27
28
<!-- include support for `wasm-bindgen --weak-refs` - see: https://rustwasm.github.io/docs/wasm-bindgen/reference/weak-references.html -->
28
29
< link data-trunk rel ="rust " data-wasm-opt ="z " data-weak-refs />
42
43
/>
43
44
44
45
< title > SeraphyBR's Blog</ title >
46
+
47
+ <!--Github Page 404 Hack for SPA routing-->
48
+ < script >
49
+ ( function ( ) {
50
+ var redirect = sessionStorage . redirect ;
51
+ delete sessionStorage . redirect ;
52
+ if ( redirect && redirect != location . href ) {
53
+ history . replaceState ( null , null , redirect ) ;
54
+ }
55
+ } ) ( ) ;
56
+ </ script >
45
57
</ head >
46
58
< body
47
59
class ="tw-vflex tw-bg-no-repeat tw-bg-cover tw-bg-center tw-bg-fixed tw-bg-gray-800 tw-bg-forest-stairs "
You can’t perform that action at this time.
0 commit comments