From 8b5ecdb35f6c786b0ce8f1d94a786937cdba0025 Mon Sep 17 00:00:00 2001 From: tangly Date: Tue, 8 Nov 2022 12:47:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E6=96=B0=E6=96=87=E7=AB=A0=E8=BF=87?= =?UTF-8?q?=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getNotionData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index c74552cb..bcd2df5e 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -42,7 +42,7 @@ export async function getGlobalNotionData({ * @returns */ function getLatestPosts({ allPages, from, latestPostCount }) { - const allPosts = allPages.filter(page => page.type === 'Post') + const allPosts = allPages.filter(page => page.type === 'Post' && page.status === 'Published') const latestPosts = Object.create(allPosts).sort((a, b) => { const dateA = new Date(a?.lastEditedTime || a?.createdTime || a?.date?.start_date)