File tree 2 files changed +60
-0
lines changed
2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html >
3
+
4
+ < head >
5
+ < meta charset ="utf-8 " />
6
+ < title > Single Page Apps for GitHub Pages</ title >
7
+ < script type ="text/javascript ">
8
+ // Single Page Apps for GitHub Pages
9
+ // MIT License
10
+ // https://github.com/rafgraph/spa-github-pages
11
+ var pathSegmentsToKeep = 0 ;
12
+
13
+ var l = window . location ;
14
+ l . replace (
15
+ l . protocol +
16
+ "//" +
17
+ l . hostname +
18
+ ( l . port ? ":" + l . port : "" ) +
19
+ l . pathname
20
+ . split ( "/" )
21
+ . slice ( 0 , 1 + pathSegmentsToKeep )
22
+ . join ( "/" ) +
23
+ "/?/" +
24
+ l . pathname
25
+ . slice ( 1 )
26
+ . split ( "/" )
27
+ . slice ( pathSegmentsToKeep )
28
+ . join ( "/" )
29
+ . replace ( / & / g, "~and~" ) +
30
+ ( l . search ? "&" + l . search . slice ( 1 ) . replace ( / & / g, "~and~" ) : "" ) +
31
+ l . hash ,
32
+ ) ;
33
+ </ script >
34
+ </ head >
35
+
36
+ < body > </ body >
37
+
38
+ </ html >
Original file line number Diff line number Diff line change 4
4
< head >
5
5
< title > lukechu</ title >
6
6
< link data-trunk rel ="tailwind-css " href ="assets/index.scss " />
7
+ < link data-trunk rel ="copy-file " href ="404.html " />
8
+ < script type ="text/javascript ">
9
+ // Single Page Apps for GitHub Pages
10
+ // MIT License
11
+ // https://github.com/rafgraph/spa-github-pages
12
+ ( function ( l ) {
13
+ if ( l . search [ 1 ] === "/" ) {
14
+ var decoded = l . search
15
+ . slice ( 1 )
16
+ . split ( "&" )
17
+ . map ( function ( s ) {
18
+ return s . replace ( / ~ a n d ~ / g, "&" ) ;
19
+ } )
20
+ . join ( "?" ) ;
21
+ window . history . replaceState (
22
+ null ,
23
+ null ,
24
+ l . pathname . slice ( 0 , - 1 ) + decoded + l . hash ,
25
+ ) ;
26
+ }
27
+ } ) ( window . location ) ;
28
+ </ script >
7
29
</ head >
8
30
9
31
< body > </ body >
You can’t perform that action at this time.
0 commit comments