mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
feature: 兼容空的slug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user