fix: paths

This commit is contained in:
saberzero1 2026-02-09 21:10:21 +01:00
parent 1ff50cbcd8
commit 1b0b7ccb15
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

3
package-lock.json generated
View file

@ -722,7 +722,7 @@
},
"node_modules/@quartz-community/utils": {
"version": "0.1.0",
"resolved": "git+ssh://git@github.com/quartz-community/utils.git#61970ce89f1019a56a95e9a9d7d414de7d6d1ebd",
"resolved": "git+ssh://git@github.com/quartz-community/utils.git#9520e0dcf98d478b71ebb5166c5de53d0236e6e2",
"license": "MIT",
"engines": {
"node": ">=22",
@ -3589,6 +3589,7 @@
"integrity": "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"esbuild": "^0.21.3",
"postcss": "^8.4.43",

View file

@ -64,8 +64,8 @@
}
},
"dependencies": {
"@quartz-community/types": "github:quartz-community/types",
"@quartz-community/utils": "github:quartz-community/utils"
"@quartz-community/utils": "github:quartz-community/utils",
"@quartz-community/types": "github:quartz-community/types"
},
"devDependencies": {
"@types/hast": "^3.0.4",

View file

@ -182,7 +182,7 @@ function renderTree(node, container, currentSlug, folderBehavior, savedState, pa
const folderLink = document.createElement("a");
folderLink.className = folderButton.className;
const folderHref = simplifySlug(node.slug);
folderLink.href = folderHref || ".";
folderLink.href = "/" + (folderHref || "");
if (folderTitle) {
folderLink.appendChild(folderTitle);
} else {
@ -217,8 +217,7 @@ function renderTree(node, container, currentSlug, folderBehavior, savedState, pa
const clone = fileTemplate.content.cloneNode(true);
const link = clone.querySelector("a");
if (link) {
// Use relative path for consistent navigation from any page
link.href = node.data.slug;
link.href = "/" + node.data.slug;
link.textContent = node.displayName || node.slugSegment;
if (node.data.slug === currentSlug) {
link.classList.add("active");