Skip to content

Commit 57c64d7

Browse files
author
Regan Maharjan
committed
revamp personal site
1 parent 9507695 commit 57c64d7

9 files changed

Lines changed: 925 additions & 82 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

assets/index-CvyYfm6n.js

Lines changed: 286 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/index-DMOB-lCj.js

Lines changed: 286 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 43 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/assets/index-CvyYfm6n.js

Lines changed: 286 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Regan Maharjan Portfolio Website</title>
7-
<script type="module" crossorigin src="/assets/index-DshZNWzI.js"></script>
7+
<script type="module" crossorigin src="/assets/index-CvyYfm6n.js"></script>
88
<link rel="stylesheet" crossorigin href="/assets/index-CMvESu3i.css">
99
</head>
1010

deploy.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ itemsToCopy.forEach(item => {
4141
}
4242
});
4343

44+
// Ensure .nojekyll exists (needed for GitHub Pages to serve files correctly)
45+
const nojekyllPath = path.join(__dirname, '.nojekyll');
46+
if (!fs.existsSync(nojekyllPath)) {
47+
fs.writeFileSync(nojekyllPath, '');
48+
console.log('✓ Created .nojekyll file');
49+
}
50+
4451
// Copy assets folder (JS/CSS from build)
4552
const buildAssetsDir = path.join(buildDir, 'assets');
4653
const rootAssetsDir = path.join(__dirname, 'assets');

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Regan Maharjan Portfolio Website</title>
7-
<script type="module" crossorigin src="/assets/index-DshZNWzI.js"></script>
7+
<script type="module" crossorigin src="/assets/index-CvyYfm6n.js"></script>
88
<link rel="stylesheet" crossorigin href="/assets/index-CMvESu3i.css">
99
</head>
1010

src/components/pages/Photography.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,23 @@ export function Photography() {
429429
// Transform images data to Photo format - memoized to prevent recalculation
430430
const photos: Photo[] = useMemo(() => {
431431
return images.map((img: any) => {
432-
// Fix image URLs: convert src/assets/ to /assets/ for production
433-
let imageUrl = img.url;
434-
if (imageUrl && imageUrl.startsWith('src/assets/')) {
432+
// Fix image URLs: ensure all paths are absolute and correct for production
433+
let imageUrl = img.url || '';
434+
435+
// Convert src/assets/ to /assets/
436+
if (imageUrl.startsWith('src/assets/')) {
435437
imageUrl = imageUrl.replace('src/assets/', '/assets/');
436438
}
439+
// Ensure /assets/ paths are correct (already correct, but double-check)
440+
else if (imageUrl.startsWith('/assets/')) {
441+
// Already correct, keep as is
442+
imageUrl = imageUrl;
443+
}
444+
// If it's a relative path without leading slash, add it
445+
else if (imageUrl.startsWith('assets/')) {
446+
imageUrl = '/' + imageUrl;
447+
}
448+
437449
return {
438450
id: img.id,
439451
src: imageUrl,

0 commit comments

Comments
 (0)