| | |
| | | ```ts title="quartz.layout.ts" |
| | | Component.Explorer({ |
| | | mapFn: (node) => { |
| | | return (node.displayName = node.displayName.toUpperCase()) |
| | | node.displayName = node.displayName.toUpperCase() |
| | | return node |
| | | }, |
| | | }) |
| | | ``` |
| | |
| | | Component.Explorer({ |
| | | filterFn: (node) => { |
| | | // set containing names of everything you want to filter out |
| | | const omit = new Set(["authoring content", "tags", "hosting"]) |
| | | return !omit.has(node.data.title.toLowerCase()) |
| | | const omit = new Set(["authoring content", "tags", "advanced"]) |
| | | |
| | | // can also use node.slug or by anything on node.data |
| | | // note that node.data is only present for files that exist on disk |
| | | // (e.g. implicit folder nodes that have no associated index.md) |
| | | return !omit.has(node.displayName.toLowerCase()) |
| | | }, |
| | | }) |
| | | ``` |
| | |
| | | Component.Explorer({ |
| | | filterFn: (node) => { |
| | | // exclude files with the tag "explorerexclude" |
| | | return node.data.tags.includes("explorerexclude") !== true |
| | | return node.data.tags?.includes("explorerexclude") !== true |
| | | }, |
| | | }) |
| | | ``` |