From 4a23684a6ec64941be609fecda04910caf6f2ffa Mon Sep 17 00:00:00 2001 From: txs Date: Fri, 1 Apr 2022 11:14:31 +0800 Subject: [PATCH 1/4] Add Giscus Plugin for NotionNext --- components/Giscus.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/Giscus.js b/components/Giscus.js index db9cfb36..7a3a5e97 100644 --- a/components/Giscus.js +++ b/components/Giscus.js @@ -3,6 +3,7 @@ import { Giscus } from '@giscus/react' /** * Giscus评论 @see https://giscus.app/zh-CN + * Contribute by @txs https://github.com/txs/NotionNext/commit/1bf7179d0af21fb433e4c7773504f244998678cb * @returns {JSX.Element} * @constructor */ From 37dc2e028f30f98b409204d45820706806f3469e Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Fri, 1 Apr 2022 13:06:23 +0800 Subject: [PATCH 2/4] Update README.md --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 92b2c1b6..af26385b 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,15 @@ yarn run start # 本地启动NextJS服务 ## 贡献者 - - - -
tangly1024
tangly1024

🎫 🔧 🎨 🐛
uWayLu
uWayLu

🔧 🐛
+ + + + + + +
tangly1024
tangly1024

🎫 🔧 🎨 🐛
uWayLu
uWayLu

🔧 🐛 +
txs
txs

🔧 🐛 +
十分期待你的[贡献](/CONTRIBUTING.md),一起来完善这个项目~ From 63fd4a265c02c7f7fef84fc6a31654bb3ba6a21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=80=E7=AD=96?= Date: Fri, 1 Apr 2022 22:39:01 +0800 Subject: [PATCH 3/4] fix: fix build error for no title or description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对于未设置标题或者描述的 notion 文档会出现报错,本 pr 修复了此问题。 --- 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 ea10fa0b..1c0c845b 100644 --- a/lib/notion/getNotionData.js +++ b/lib/notion/getNotionData.js @@ -157,8 +157,8 @@ async function getBlogInfo ({ notionPageData, from }) { return null } const collection = notionPageData?.collection - const title = collection?.name[0][0] || BLOG.TITLE - const description = collection?.description[0][0] || BLOG.DESCRIPTION + const title = collection?.name?.[0][0] || BLOG.TITLE + const description = collection?.description?.[0][0] || BLOG.DESCRIPTION const pageCover = mapCoverUrl(collection?.cover, notionPageData.block) return { title, description, pageCover } } From ebd1b9d49122f798306e240fd1b91bdc9a02e357 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 2 Apr 2022 09:42:34 +0800 Subject: [PATCH 4/4] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af26385b..76fef972 100644 --- a/README.md +++ b/README.md @@ -98,10 +98,12 @@ yarn run start # 本地启动NextJS服务 - - +
tangly1024
tangly1024

🎫 🔧 🎨 🐛
uWayLu
uWayLu

🔧 🐛 +
uWayLu
uWayLu

🔧 🐛
txs
txs

🔧 🐛 +
txs
txs

🔧 🐛
txs
yuzhanglong

🔧 🐛 +