Both default to false so existing behavior is preserved. When enabled,
they exclude generated tag index pages (slugs under the 'tags/' prefix)
and folder index pages (slugs matching Quartz's folder-path convention,
delegated to isFolderPath from @quartz-community/utils) from the recent
notes list. The new filters run before any user-supplied opts.filter,
mirroring the existing unlisted filter.
Exports isTagPageSlug and isFolderPageSlug helpers so they can be
composed into custom filter functions, with unit tests for both.
Import QuartzComponentConstructor and GlobalConfiguration from
@quartz-community/types rather than redeclaring them. Simplify
RecentNotesPluginData to an intersection with Record<string, unknown>
since the redundant fields (slug, filePath, dates, frontmatter) are
already declared on QuartzPluginData.
The plugin genuinely narrows GlobalConfiguration (it assumes locale
and defaultDateType are resolved), so a ResolvedGlobalConfiguration
type alias is kept for that assertion. It is a type intersection
(not an interface extension) to avoid the DTS emission issue that
affected PageList.tsx historically.
Respect the file.data.unlisted convention. Pages marked unlisted are
filtered out of the recent notes list before any user-supplied opts.filter
runs, so they cannot be accidentally surfaced by a permissive custom
filter.
Extracts the filter into a named filterListedPages() helper and exports
it for reuse and testing. Adds 3 unit tests covering unlisted exclusion,
passthrough when nothing is unlisted, and empty-input handling.
Plugins run server-side during the Quartz build step, not in the
browser. Setting platform: 'node' tells esbuild to treat Node builtins
as available externals and avoids CJS-in-ESM require() failures for
any bundled dependencies that use Node APIs.