Exclude 'index' page from RecentNotes filtering

This commit is contained in:
Komeno 2025-11-11 15:10:13 +09:00 committed by GitHub
parent 52e8c8045f
commit 5d932e004e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ export default ((userOpts?: Partial<Options>) => {
cfg, cfg,
}: QuartzComponentProps) => { }: QuartzComponentProps) => {
const opts = { ...defaultOptions(cfg), ...userOpts } const opts = { ...defaultOptions(cfg), ...userOpts }
const pages = allFiles.filter(opts.filter).sort(opts.sort) const pages = allFiles.filter((page) => page.slug !== "index").filter(opts.filter).sort(opts.sort)
const remaining = Math.max(0, pages.length - opts.limit) const remaining = Math.max(0, pages.length - opts.limit)
return ( return (
<div class={classNames(displayClass, "recent-notes")}> <div class={classNames(displayClass, "recent-notes")}>