The quartzCustomizations directory exports explorerConfig, and object to configure Quartz’s native Explorer component. These customizations are:

  1. Add a custom sortFn. With this function, all pages with a order frontmatter property, are sorted by that property’s value. Pages without an order frontmatter property are then sorted afterwards.
  2. Set folderClickBehavior to ‘link’
  3. 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

  1. Open quartz.layout.ts
  2. Import explorerConfig from the quartzCustomizations file
  3. Replace any calls of Component.Explorer() with Component.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)