Skip to content

Commit 408a585

Browse files
Chore: add comment to randomPage.inline.ts
Add comment explaining how to exclude folders from the 'Random page' button
1 parent 280f397 commit 408a585

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

quartz/components/scripts/randomPage.inline.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ function getRandomInt(max: number) {
66

77
function isValidUrl(newSlug: string, oldSlug: String) {
88
return oldSlug !== newSlug && !newSlug.includes("/contributing/")
9+
// to exclude a folder add: && !newSlug.includes("/folder-name/")
10+
// this can be repeated
911
}
1012

1113
async function navigateToRandomPage() {

0 commit comments

Comments
 (0)