From b10a88d5d22ac70341ea8806c94930dfb7a5c4c4 Mon Sep 17 00:00:00 2001 From: dihwang Date: Thu, 9 Apr 2026 11:20:08 +0900 Subject: [PATCH] =?UTF-8?q?filterFn=20=EA=B7=B8=EC=A7=80=EA=B0=99=EB=84=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quartz.layout.ts | 50 ++---------------------------------------------- 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/quartz.layout.ts b/quartz.layout.ts index a95eff4..970a5be 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -38,30 +38,7 @@ export const defaultContentPageLayout: PageLayout = { { Component: Component.ReaderMode() }, ], }), - Component.Explorer({ - filterFn: (node) => { - // 1. 숨기고 싶은 키워드 (index.md의 title에 적은 것과 폴더명 모두 포함) - const omitWords = ["extra", "template", "note", "volume"] - - // 파일(페이지)은 기본적으로 보여줍니다. - if (node.file) return true - - // 2. node가 가진 다양한 이름 속성들을 싹 다 긁어모읍니다. - const namesToCheck = [ - node.name, - node.displayName, - node.file?.frontmatter?.title // index.md가 있다면 그 안의 title까지 - ] - - // 3. 하나라도 omitWords에 포함되어 있는지 확인합니다. - const shouldOmit = namesToCheck.some(name => { - const lowerName = name?.toLowerCase() ?? "" - return omitWords.some(word => lowerName.includes(word)) - }) - - return !shouldOmit - }, - }), + Component.Explorer(), ], right: [ Component.Graph(), @@ -85,30 +62,7 @@ export const defaultListPageLayout: PageLayout = { { Component: Component.Darkmode() }, ], }), - Component.Explorer({ - filterFn: (node) => { - // 1. 숨기고 싶은 키워드 (index.md의 title에 적은 것과 폴더명 모두 포함) - const omitWords = ["extra", "template", "note", "volume"] - - // 파일(페이지)은 기본적으로 보여줍니다. - if (node.file) return true - - // 2. node가 가진 다양한 이름 속성들을 싹 다 긁어모읍니다. - const namesToCheck = [ - node.name, - node.displayName, - node.file?.frontmatter?.title // index.md가 있다면 그 안의 title까지 - ] - - // 3. 하나라도 omitWords에 포함되어 있는지 확인합니다. - const shouldOmit = namesToCheck.some(name => { - const lowerName = name?.toLowerCase() ?? "" - return omitWords.some(word => lowerName.includes(word)) - }) - - return !shouldOmit - }, - }), + Component.Explorer(), ], right: [], }