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