Skip to content

Commit

Permalink
move function to file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Feb 29, 2024
1 parent 18f7e03 commit 24ff856
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions quartz/util/function.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { secretPage } from "../../quartz.layout";
import { FileNode, Options } from "../components/ExplorerNode"

export const sortFn: Options["sortFn"] = (a: FileNode, b: FileNode) => {
if (a.order && b.order) {
return a.order - b.order;
} else if (a.order) {
return -1;
}
return 1;
};


export const filterFn = (node: FileNode) => {
return !secretPage.has(node.name)
}

0 comments on commit 24ff856

Please sign in to comment.