filter files on rebuild

This commit is contained in:
circular 2025-07-02 12:48:09 +10:00
parent 52a5196f38
commit 2f41c06336
No known key found for this signature in database
GPG Key ID: 5FD9E3482ABB74DE

View File

@ -251,9 +251,11 @@ async function rebuild(changes: ChangeEvent[], clientRefresh: () => void, buildD
// update allFiles and then allSlugs with the consistent view of content map // update allFiles and then allSlugs with the consistent view of content map
ctx.allFiles = Array.from(contentMap.keys()) ctx.allFiles = Array.from(contentMap.keys())
ctx.allSlugs = ctx.allFiles.map((fp) => slugifyFilePath(fp as FilePath)) ctx.allSlugs = ctx.allFiles.map((fp) => slugifyFilePath(fp as FilePath))
const processedFiles = Array.from(contentMap.values()) let processedFiles = filterContent(ctx,
.filter((file) => file.type === "markdown") Array.from(contentMap.values())
.map((file) => file.content) .filter((file) => file.type === "markdown")
.map((file) => file.content)
)
let emittedFiles = 0 let emittedFiles = 0
for (const emitter of cfg.plugins.emitters) { for (const emitter of cfg.plugins.emitters) {