mirror of
https://github.com/jackyzha0/quartz.git
synced 2026-03-21 21:45:42 -05:00
Exclude 'index' page from RecentNotes filtering
This commit is contained in:
parent
52e8c8045f
commit
5d932e004e
@ -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")}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user