Merge pull request #3310 from LooseLi/post-sort-by

fix(文章排序)
This commit is contained in:
tangly1024
2025-04-11 17:54:19 +08:00
committed by GitHub

View File

@@ -245,7 +245,7 @@ async function convertNotionToSiteDate(pageId, from, pageRecordMap) {
})
// Sort by date
if (siteConfig('POSTS_SORT_BY', '', NOTION_CONFIG) === 'date') {
if (siteConfig('POSTS_SORT_BY', null, NOTION_CONFIG) === 'date') {
allPages.sort((a, b) => {
return b?.publishDate - a?.publishDate
})