Skip to content

Commit

Permalink
docs(explorer): update default config + new example (jackyzha0#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
benschlegel authored Sep 21, 2023
1 parent 4845223 commit dcdeae4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/features/explorer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Component.Explorer({
sortFn: (a, b) => {
... // default implementation shown later
},
filterFn: undefined,
filterFn: filterFn: (node) => node.name !== "tags", // filters out 'tags' folder
mapFn: undefined,
// what order to apply functions in
order: ["filter", "map", "sort"],
Expand Down Expand Up @@ -160,6 +160,16 @@ Component.Explorer({

You can customize this by changing the entries of the `omit` set. Simply add all folder or file names you want to remove.

### Show every element in explorer

To override the default filter function that removes the `tags` folder from the explorer, you can set the filter function to `undefined`.

```ts title="quartz.layout.ts"
Component.Explorer({
filterFn: undefined, // apply no filter function, every file and folder will visible
})
```

## Advanced examples

### Add emoji prefix
Expand Down

0 comments on commit dcdeae4

Please sign in to comment.