Skip to content

Commit 364ec9c

Browse files
FIX: Correct image paths for GitHub Pages sub-directory
1 parent d562d0b commit 364ec9c

4 files changed

Lines changed: 78 additions & 3 deletions

File tree

assets/index-B8QPZ0pN.js

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

frontend/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}(window.location));
1717
</script>
1818
<script src="./runtime-config.js"></script>
19-
<script type="module" crossorigin src="./assets/index-DY_v0VC-.js"></script>
19+
<script type="module" crossorigin src="./assets/index-B8QPZ0pN.js"></script>
2020
<link rel="stylesheet" crossorigin href="./assets/index-BHQWbmWP.css">
2121
</head>
2222
<body>

frontend/src/offlineStore.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2910,13 +2910,21 @@ export const offlineApi = {
29102910
},
29112911
exploreJobs({ q, category, tag, limit = 120, offset = 0 }) {
29122912
console.log('[OfflineStore] exploreJobs called', { q, category, tag, limit, offset, careersCount: CAREERS.length });
2913+
2914+
// Fix image path for GitHub Pages
2915+
const getBasePath = () => {
2916+
const path = window.location.pathname;
2917+
return path.includes('/myAIchatbotProject') ? '/myAIchatbotProject' : '';
2918+
};
2919+
const basePath = getBasePath();
2920+
29132921
const query = normalizeText(String(q || ''));
29142922
let list = CAREERS.map((c, idx) => ({
29152923
id: idx + 1,
29162924
title: c.name,
29172925
category: c.category,
29182926
tags: c.tags,
2919-
image_url: 'career-icons/default.svg'
2927+
image_url: `${basePath}/career-icons/default.svg` // Fix path
29202928
}));
29212929
if (query) {
29222930
list = list.filter((j) => {

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}(window.location));
1717
</script>
1818
<script src="./runtime-config.js"></script>
19-
<script type="module" crossorigin src="./assets/index-DY_v0VC-.js"></script>
19+
<script type="module" crossorigin src="./assets/index-B8QPZ0pN.js"></script>
2020
<link rel="stylesheet" crossorigin href="./assets/index-BHQWbmWP.css">
2121
</head>
2222
<body>

0 commit comments

Comments
 (0)