From 7795979ebc2e192d48e88f05369bbba77f7413f7 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 2 Apr 2022 12:31:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8A=A0=E9=94=81=EF=BC=9A=20=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E6=96=87=E7=AB=A0=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.js | 3 +++ pages/page/[page].js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pages/index.js b/pages/index.js index bfbda4dd..96778eea 100644 --- a/pages/index.js +++ b/pages/index.js @@ -32,6 +32,9 @@ export async function getStaticProps () { if (BLOG.POST_LIST_PREVIEW === 'true') { for (const i in postsToShow) { const post = postsToShow[i] + if (post.password && post.password !== '') { + continue + } const blockMap = await getPostBlocks(post.id, 'slug', BLOG.POST_PREVIEW_LINES) if (blockMap) { post.blockMap = blockMap diff --git a/pages/page/[page].js b/pages/page/[page].js index 00ef030b..4561b8c6 100644 --- a/pages/page/[page].js +++ b/pages/page/[page].js @@ -42,6 +42,9 @@ export async function getStaticProps ({ params: { page } }) { if (BLOG.POST_LIST_PREVIEW === 'true') { for (const i in props.posts) { const post = props.posts[i] + if (post.password && post.password !== '') { + continue + } const blockMap = await getPostBlocks(post.id, 'slug', BLOG.POST_PREVIEW_LINES) if (blockMap) { post.blockMap = blockMap From b9e064fc058fa459fd35aaf294007fee026f8bfa Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 2 Apr 2022 12:39:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=AB=99=E7=82=B9?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/index.js b/pages/index.js index 96778eea..2e314239 100644 --- a/pages/index.js +++ b/pages/index.js @@ -14,7 +14,7 @@ export async function getStaticProps () { const props = await getGlobalNotionData({ from, pageType: ['Post'] }) const { allPosts, siteInfo } = props const meta = { - title: `${siteInfo.title}`, + title: `${siteInfo.title} | ${siteInfo.description}`, description: siteInfo.description, type: 'website' }