mirror of
https://github.com/jackyzha0/quartz
synced 2026-11-27 22:14:40 +01:00
2.8 KiB
2.8 KiB
title, description, tags, image, repository, enabled, required
| title | description | tags | image | repository | enabled | required | |
|---|---|---|---|---|---|---|---|
| Explorer | File tree explorer sidebar. |
|
[quartz-community/explorer](https://github.com/quartz-community/explorer) | true | false |
File tree explorer sidebar.
Note
For information on how to add, remove or configure plugins, see the configuration#Plugins page.
See features/explorer for detailed usage information.
Configuration
This plugin accepts the following configuration options:
YAML options (in quartz.config.yaml):
title: The title of the explorer. Defaults to the localized "Explorer" (see i18n).folderClickBehavior: The behavior when a folder is clicked. Can be"link"to navigate or"collapse"to toggle. Defaults tolink.folderDefaultState: The default state of folders. Can be"collapsed"or"open". Defaults tocollapsed.useSavedState: Whether to use local storage to save the state of the explorer. Defaults totrue.sort: Sort rules, applied in sequence: entries the first rule considers equal are sorted by the next one. Defaults to[folder, title](folders first, then by title). See features/explorer#Sorting.rootFolder: Show only this folder's contents, e.g.NotesorNotes/Daily Notes. Defaults to everything. See features/explorer#Several explorers.order: The order in whichfilterFn,mapFnandsortFnrun. Defaults to[filter, map, sort].
TS override options (in quartz.ts, for callback functions that can't be expressed in YAML):
sortFn: Custom sort function for ordering files and folders. Replacessort.filterFn: Custom filter function to exclude specific nodes.mapFn: Custom map function to transform node properties (e.g. display names).
By default the explorer hides the tags folder (filterFn) and sorts folders before files, then by title in natural order (Note 2 before Note 10).
Default options
- source: "@quartz-community/explorer"
enabled: true
options:
folderClickBehavior: link
folderDefaultState: collapsed
useSavedState: true
layout:
position: left
priority: 50
TS override example
import * as ExternalPlugin from "./.quartz/plugins"
// Must be placed before loadQuartzConfig()
ExternalPlugin.Explorer({
mapFn: (node) => {
node.displayName = node.displayName.toUpperCase()
return node
},
})
See features/explorer#Advanced customization for more examples.
API
- Category: Component
- Function name:
ExternalPlugin.Explorer(). - Source:
quartz-community/explorer - Install:
npx quartz plugin add @quartz-community/explorer(included in the default configuration)