From fcd81353f88b613e5e93c089e10e530d08695b3f Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 01 Jun 2023 23:48:38 +0000
Subject: [PATCH] heading linking
---
quartz/processors/filter.ts | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/quartz/processors/filter.ts b/quartz/processors/filter.ts
index e69de29..31662bc 100644
--- a/quartz/processors/filter.ts
+++ b/quartz/processors/filter.ts
@@ -0,0 +1,16 @@
+import { PerfTimer } from "../perf"
+import { QuartzFilterPlugin } from "../plugins/types"
+import { ProcessedContent } from "../plugins/vfile"
+
+export function filterContent(plugins: QuartzFilterPlugin[], content: ProcessedContent[], verbose: boolean): ProcessedContent[] {
+ const perf = new PerfTimer()
+ const initialLength = content.length
+ for (const plugin of plugins) {
+ content = content.filter(plugin.shouldPublish)
+ }
+
+ if (verbose) {
+ console.log(`Filtered out ${initialLength - content.length} files in ${perf.timeSince()}`)
+ }
+ return content
+}
--
Gitblit v1.10.0