|
5 | 5 | <link rel="icon" type="image/svg+xml" href="/logo.svg" /> |
6 | 6 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
7 | 7 | <title>Cody Chaplin - Portfolio</title> |
8 | | - <script type="text/javascript"> |
9 | | - // Single Page Apps for GitHub Pages |
10 | | - // MIT License |
11 | | - // https://github.com/rafgraph/spa-github-pages |
12 | | - // This script takes the current url and converts the path and query |
13 | | - // string into just a query string, and then redirects the browser |
14 | | - // to the new url with only a query string and hash fragment, |
15 | | - // e.g., https://www.foo.tld/one/two?a=b&c=d#qwe, becomes |
16 | | - // https://www.foo.tld/?/one/two&a=b~and~c=d#qwe |
17 | | - // Note: this 404.html file must be at least 512 bytes for it to work |
18 | | - // with Internet Explorer (it is currently > 512 bytes) // 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 and not the real folder. |
21 | | - |
22 | | - // For a custom domain or GitHub Pages user site, set this to 0 |
23 | | - var pathSegmentsToKeep = 1; |
24 | | - |
25 | | - var l = window.location; |
26 | | - l.replace( |
27 | | - l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') + |
28 | | - l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' + |
29 | | - l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') + |
30 | | - (l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') + |
31 | | - l.hash |
32 | | - ); |
33 | | - </script> |
34 | 8 | </head> |
35 | 9 | <body> |
36 | 10 | </body> |
|
0 commit comments