Fix(PageList): keep byDateAndAlphabeticalFolderFirst as the default sorting order for PageList

This commit is contained in:
K Gopal Krishna 2025-04-04 22:56:11 +05:30
parent 6a37414aba
commit 558e39006b

View File

@ -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)