Skip to content

Commit 9d56cb0

Browse files
committed
add telegram link
1 parent ba050dc commit 9d56cb0

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

quartz/quartz.layout.ts

+16-17
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,39 @@ export const sharedPageComponents: SharedLayout = {
99
links: {
1010
Synonym: "https://synonym.to",
1111
GitHub: "https://github.com/pubky/pubky-knowledge-base",
12-
Discord: "https://discord.com/invite/DxTBJXvJxn",
12+
Telegram: "https://t.me/pubkychat",
1313
},
1414
}),
1515
}
1616

1717
const explorer = Component.Explorer({
1818
sortFn: (a, b) => {
1919
// Helper function to prioritise "Introduction" and "ELI5"
20-
const priority = (name : string) => {
21-
if (name === "Introduction") return -2; // Highest priority
22-
if (name === "ELI5") return -1; // Second highest priority
23-
return 0; // No priority
24-
};
20+
const priority = (name: string) => {
21+
if (name === "Introduction") return -2 // Highest priority
22+
if (name === "ELI5") return -1 // Second highest priority
23+
return 0 // No priority
24+
}
2525

2626
// Check if both are files or directories
27-
const aIsFile = typeof a.file !== null;
28-
const bIsFile = typeof b.file !== null;
27+
const aIsFile = typeof a.file !== null
28+
const bIsFile = typeof b.file !== null
2929

3030
// Prioritize specific filenames first
31-
const aPriority = priority(a.name);
32-
const bPriority = priority(b.name);
31+
const aPriority = priority(a.name)
32+
const bPriority = priority(b.name)
3333

3434
// If either has a priority, sort based on that
35-
if (aPriority !== bPriority) return aPriority - bPriority;
35+
if (aPriority !== bPriority) return aPriority - bPriority
3636

3737
// If one is a file and the other is a directory, sort files first
38-
if (aIsFile && !bIsFile) return -1; // a is a file, b is a directory
39-
if (!aIsFile && bIsFile) return 1; // a is a directory, b is a file
38+
if (aIsFile && !bIsFile) return -1 // a is a file, b is a directory
39+
if (!aIsFile && bIsFile) return 1 // a is a directory, b is a file
4040

4141
// If both are either files or directories, sort alphabetically
42-
return a.name.localeCompare(b.name);
43-
}
44-
});
45-
42+
return a.name.localeCompare(b.name)
43+
},
44+
})
4645

4746
// components for pages that display a single page (e.g. a single note)
4847
export const defaultContentPageLayout: PageLayout = {

0 commit comments

Comments
 (0)