feature: 新增配置项预览行数

This commit is contained in:
tangly1024
2022-01-12 11:10:21 +08:00
parent 7ba27a1b41
commit d926c726b5
3 changed files with 3 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ export async function getStaticProps () {
)
for (const i in postsToShow) {
const post = postsToShow[i]
const blockMap = await getPostBlocks(post.id, 'slug', 12)
const blockMap = await getPostBlocks(post.id, 'slug', BLOG.home.previewLines)
if (blockMap) {
post.blockMap = blockMap
}

View File

@@ -54,7 +54,7 @@ export async function getStaticProps ({ params: { page } }) {
for (const i in postsToShow) {
const post = postsToShow[i]
const blockMap = await getPostBlocks(post.id, 'slug', 12)
const blockMap = await getPostBlocks(post.id, 'slug', BLOG.home.previewLines)
if (blockMap) {
post.blockMap = blockMap
}