mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 13:24:05 -06:00
Fix(PageList): keep byDateAndAlphabeticalFolderFirst as the default sorting order for PageList
This commit is contained in:
parent
6a37414aba
commit
558e39006b
@ -58,7 +58,7 @@ type Props = {
|
|||||||
} & QuartzComponentProps
|
} & QuartzComponentProps
|
||||||
|
|
||||||
export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort }: Props) => {
|
export const PageList: QuartzComponent = ({ cfg, fileData, allFiles, limit, sort }: Props) => {
|
||||||
const sorter = sort ?? byDateAndAlphabetical(cfg)
|
const sorter = sort ?? byDateAndAlphabeticalFolderFirst(cfg)
|
||||||
let list = allFiles.sort(sorter)
|
let list = allFiles.sort(sorter)
|
||||||
if (limit) {
|
if (limit) {
|
||||||
list = list.slice(0, limit)
|
list = list.slice(0, limit)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user