Skip to content

Commit ed6efb7

Browse files
updated breadcrumb
1 parent 8eb31ea commit ed6efb7

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

assets/js/generateBreadcrumb.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ function generateBreadCrumb() {
44
// Split the pathname into parts
55
let pathArray = window.location.pathname.split("/").filter((p) => p);
66

7-
// Detect repo name (first part of GitHub Pages URL)
8-
const repoName = pathArray.length > 0 ? pathArray[0] : "";
7+
const repoName = pathArray.length > 0 ? pathArray[0] : "courses-notes";
98
const basePath = `/${repoName}`;
109

11-
// Drop repo name from breadcrumb display
12-
if (repoName) {
13-
pathArray.shift();
14-
}
10+
pathArray.shift();
1511

1612
// If last segment is index.html, drop it
1713
if (pathArray[pathArray.length - 1]?.toLowerCase() === "index.html") {

0 commit comments

Comments
 (0)