Skip to content

Commit

Permalink
Merge pull request #82 from AavaGames/master
Browse files Browse the repository at this point in the history
Exclude Kanban boards made by Kanban Plugin by mgmeyers
  • Loading branch information
dvcrn authored Feb 29, 2024
2 parents 706d249 + c8e47cc commit 6f6f89f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion exclusions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ export function isExcalidraw(app: App, f: TFile) {
);
}

export function isKanban(app: App, f: TFile) {
const fileCache = app.metadataCache.getFileCache(f);
return (
!!fileCache?.frontmatter && !!fileCache.frontmatter['kanban-plugin']
);
}

export function isExcluded(app: App, f: TFile) {
if (isExcalidraw(app, f)) {
return true;
}

if (isKanban(app, f)) {
return true;
}

return false;
}

0 comments on commit 6f6f89f

Please sign in to comment.