mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 23:16:48 +00:00
feature:
优化单页面JSON文件
This commit is contained in:
@@ -172,6 +172,7 @@ export async function getStaticProps ({ params: { slug } }) {
|
||||
const blockMap = await getPostBlocks(post.id, 'slug')
|
||||
post.toc = []
|
||||
if (blockMap) {
|
||||
post.content = Object.keys(blockMap.block)
|
||||
post.toc = getPageTableOfContents(post, blockMap)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user