Quartz's default folder page plugin.
  • TypeScript 98.4%
  • SCSS 1.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-10 00:09:39 +01:00
.changeset chore: version package 2026-11-09 23:08:30 +00:00
.github/workflows ci: run ci.yml on the changesets version PR and report it as a commit status 2026-11-09 03:47:26 +01:00
src fix: generate folder pages for folders holding only virtual pages (jackyzha0/quartz#2576) 2026-11-08 19:12:56 +01:00
test fix: generate folder pages for folders holding only virtual pages (jackyzha0/quartz#2576) 2026-11-08 19:12:56 +01:00
types chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.eslintrc.json chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.gitignore chore: migrate to npm publishing 2026-07-23 09:07:10 +02:00
.prettierignore chore: centralize type declarations and standardize tooling config 2026-03-16 18:55:26 +01:00
.prettierrc Initial commit 2026-02-13 18:36:01 +01:00
CHANGELOG.md chore: version package 2026-11-09 23:08:30 +00:00
LICENSE Initial commit 2026-02-13 18:36:01 +01:00
package-lock.json chore: version package 2026-11-09 23:08:30 +00:00
package.json chore: version package 2026-11-09 23:08:30 +00:00
README.md docs(readme): Quartz 5.1 — npm install and config, correct options and defaults 2026-11-09 22:57:48 +01:00
tsconfig.build.json fix: use separate tsconfig for DTS build to avoid vitest dependency 2026-03-22 13:12:01 +01:00
tsconfig.json Initial commit 2026-02-13 18:36:01 +01:00
tsup.config.ts build: keep preact and the other shared packages external (tsup's noExternal overrode them) 2026-11-09 04:49:22 +01:00
vitest.config.ts fix: add passWithNoTests to vitest config 2026-03-09 03:21:30 +01:00

@quartz-community/folder-page

Renders folder index pages showing a listing of all pages within that folder. Automatically generates virtual index pages for folders that don't have one.

Installation

npx quartz plugin add @quartz-community/folder-page

Usage

This plugin is already enabled in the default quartz.config.yaml:

plugins:
  - source: "@quartz-community/folder-page"
    enabled: true
    options:
      showFolderCount: true
      showSubfolders: true
      prefixFolders: false

sort is a function, so it needs a TypeScript override:

import * as ExternalPlugin from "./.quartz/plugins";

// Must be placed before loadQuartzConfig()
ExternalPlugin.FolderPage({
  sort: (f1, f2) => (f1.frontmatter?.title ?? "").localeCompare(f2.frontmatter?.title ?? ""),
});

Configuration

Option Type Default Description
showFolderCount boolean true Whether to show the number of entries in the folder ("N items under this folder").
showSubfolders boolean true Whether to list each direct subfolder as an entry of its own (linking to the subfolder's page). When false, only pages directly inside the folder are listed.
prefixFolders boolean false Whether to prefix generated folder page titles (and index notes without a title) with the localized "Folder" label (e.g. "Folder: notes").
sort SortFn folders first, then by date (newest first), then title A function (f1, f2) => number to sort the entries. TS override only.

Folders are listed even when they hold only pages generated by other page types, such as .base or .canvas pages. Pages hidden with unlisted-pages are left out.

Documentation

See the Quartz documentation for more information.

License

MIT