From 72f0a0b5899ff0d523d0fd7fec74d6f0e0a2cefb Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 4 Jan 2022 11:22:41 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E5=85=BC=E5=AE=B9=E7=A9=BA=E7=9A=84?= =?UTF-8?q?slug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getAllPosts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/notion/getAllPosts.js b/lib/notion/getAllPosts.js index e3d83594..8cd43e34 100644 --- a/lib/notion/getAllPosts.js +++ b/lib/notion/getAllPosts.js @@ -29,6 +29,7 @@ export async function getAllPosts ({ notionPageData, from, includePage = false } for (let i = 0; i < pageIds.length; i++) { const id = pageIds[i] const properties = (await getPageProperties(id, pageBlock, schema)) || null + properties.slug = properties.slug ?? properties.id properties.createdTime = new Date(pageBlock[id].value?.created_time).toString() properties.lastEditedTime = new Date(pageBlock[id].value?.last_edited_time).toString() properties.fullWidth = pageBlock[id].value?.format?.page_full_width ?? false