文章预览优化

This commit is contained in:
tangly1024
2022-01-11 22:49:40 +08:00
parent 6d9695e411
commit d4ab0e7f49
6 changed files with 94 additions and 33 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')
const blockMap = await getPostBlocks(post.id, 'slug', 12)
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')
const blockMap = await getPostBlocks(post.id, 'slug', 12)
if (blockMap) {
post.blockMap = blockMap
}