Skip to content

Commit f42b583

Browse files
updated
1 parent ffd76bf commit f42b583

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

public/404.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Akhil Sai Latchireddi - Portfolio</title>
6+
<script type="text/javascript">
7+
// Single Page Apps for GitHub Pages
8+
// MIT License
9+
// https://github.com/rafgraph/spa-github-pages
10+
var pathSegmentsToKeep = 0;
11+
12+
var l = window.location;
13+
l.replace(
14+
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
15+
l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
16+
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
17+
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
18+
l.hash
19+
);
20+
</script>
21+
</head>
22+
<body>
23+
</body>
24+
</html>

public/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@
3131
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
3232
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
3333

34+
<!-- Start Single Page Apps for GitHub Pages -->
35+
<script type="text/javascript">
36+
// Single Page Apps for GitHub Pages
37+
// MIT License
38+
// https://github.com/rafgraph/spa-github-pages
39+
(function(l) {
40+
if (l.search[1] === '/' ) {
41+
var decoded = l.search.slice(1).split('&').map(function(s) {
42+
return s.replace(/~and~/g, '&')
43+
}).join('?');
44+
window.history.replaceState(null, null,
45+
l.pathname.slice(0, -1) + decoded + l.hash
46+
);
47+
}
48+
}(window.location))
49+
</script>
50+
<!-- End Single Page Apps for GitHub Pages -->
51+
3452
<title>Akhil Sai Latchireddi | Software Developer & CI/CD Specialist</title>
3553
</head>
3654
<body>

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ThemeProvider } from './contexts/ThemeContext';
1111
function App() {
1212
return (
1313
<ThemeProvider>
14-
<Router basename={process.env.NODE_ENV === 'production' ? '/AkhilSaiLatchireddi.github.io' : ''}>
14+
<Router>
1515
<div className="min-h-screen bg-white dark:bg-gray-900 transition-colors duration-300">
1616
<Header />
1717

0 commit comments

Comments
 (0)