From 987a407e556b767b4cfa08065b08ebf49a8eedb5 Mon Sep 17 00:00:00 2001 From: Timothee <84281349+devnyxie@users.noreply.github.com> Date: Fri, 4 Apr 2025 07:22:08 +0200 Subject: [PATCH] Update explorer.md Currently the proposed filter by title is not working; Let's add filter by slug alternative for now. --- docs/features/explorer.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/features/explorer.md b/docs/features/explorer.md index 3a3c1e1f9..20238937f 100644 --- a/docs/features/explorer.md +++ b/docs/features/explorer.md @@ -151,6 +151,19 @@ Component.Explorer({ }) ``` +Alternatively, here's how to filter by slug: + +```ts title="quartz.layout.ts" +// Filter by slug +Component.Explorer({ + filterFn: (node) => { + // set containing slugs of everything you want to filter out + const omit = new Set(["authoring content", "tags", "hosting"]) + return !omit.has((node.slug ?? "").split("/")[0]) + }, +}) +``` + ### Remove files by tag You can access the tags of a file by `node.data.tags`.