From 3030423cf229665a4ee75dbc6c6cc985fbe7e8c7 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 14 Mar 2022 12:42:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?forEach=E5=87=BD=E6=95=B0=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/getNotionData.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/notion/getNotionData.js b/lib/notion/getNotionData.js index 0ce1263f..94990a8f 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -115,13 +115,13 @@ async function getCustomNav ({ notionPageData }) { function getTagOptions (schema) { if (!schema) return {} const tagSchema = Object.values(schema).find(e => e.name === 'tags') - return tagSchema?.options || {} + return tagSchema?.options || [] } function getCategoryOptions (schema) { if (!schema) return {} const categorySchema = Object.values(schema).find(e => e.name === 'category') - return categorySchema?.options || {} + return categorySchema?.options || [] } /** From 99ba604e97f1804febe02118f298ba5b90b3d278 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 14 Mar 2022 12:47:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?RSSbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/rss.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rss.js b/lib/rss.js index 9400629f..9c3f3fc7 100644 --- a/lib/rss.js +++ b/lib/rss.js @@ -19,10 +19,10 @@ export function generateRss (posts) { }) posts.forEach(post => { feed.addItem({ - TITLE: post.title, + title: post.title, id: `${BLOG.LINK}/article/${post.slug}`, - LINK: `${BLOG.LINK}/article/${post.slug}`, - DESCRIPTION: post.summary, + link: `${BLOG.LINK}/article/${post.slug}`, + description: post.summary, date: new Date(post?.date?.start_date || post.createdTime) }) })