配置预览文章

This commit is contained in:
tangly1024
2022-03-16 12:33:17 +08:00
parent ddcf06b0da
commit ac2862fe1d
3 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ export async function getStaticProps () {
BLOG.POSTS_PER_PAGE * (page - 1),
BLOG.POSTS_PER_PAGE * page
)
if (BLOG.POST_LIST_PREVIEW) {
if (BLOG.POST_LIST_PREVIEW === 'true') {
for (const i in postsToShow) {
const post = postsToShow[i]
const blockMap = await getPostBlocks(post.id, 'slug', BLOG.POST_PREVIEW_LINES)

View File

@@ -45,7 +45,7 @@ export async function getStaticProps ({ params: { page } }) {
BLOG.POSTS_PER_PAGE * (page - 1),
BLOG.POSTS_PER_PAGE * page
)
if (BLOG.POST_LIST_PREVIEW) {
if (BLOG.POST_LIST_PREVIEW === 'true') {
for (const i in postsToShow) {
const post = postsToShow[i]
const blockMap = await getPostBlocks(post.id, 'slug', BLOG.POST_PREVIEW_LINES)