The quartzCustomizations directory exports explorerConfig, and object to configure Quartz’s native Explorer component. These customizations are:
- Add a custom
sortFn. With this function, all pages with aorderfrontmatter property, are sorted by that property’s value. Pages without anorderfrontmatter property are then sorted afterwards. - Set
folderClickBehaviorto ‘link’ - Add a custom
filterFn. With this function directories named ‘data’ (this is matched ignoring case) are excluded from the Explorer sidebar tree. This does not cause Quartz to ignore these pages — they are still rendered to html and accessible via interlinks between pages. They just will not show up in the Explorer tree view.
Further explanation of these changes can be found in the Quartz Explorer documentation
Enabling Configuration Integration
- Open
quartz.layout.ts - Import
explorerConfigfrom thequartzCustomizationsfile - Replace any calls of
Component.Explorer()withComponent.Explorer(explorerConfig). There should be two: one in the content page layout and one in the list page layout.
Example Implementation
// quartz.config.ts
...
import { mergeQuartzConfig } from "../scripts/mergeQuartzConfig"
const config: QuartzConfig ={
...
}
// Update default export
export default mergeQuartzConfig(config)