diff --git a/lib/notion/getAllPosts.js b/lib/notion/getAllPosts.js index b51b181d..0d10d0de 100644 --- a/lib/notion/getAllPosts.js +++ b/lib/notion/getAllPosts.js @@ -37,6 +37,7 @@ export async function getAllPosts ({ notionPageData, from, includePage = false } properties.tagItems = properties?.tags?.map(tag => { return { name: tag, color: tagOptions.find(t => t.value === tag)?.color || 'gray' } }) || [] + delete properties.content data.push(properties) } diff --git a/pages/article/[slug].js b/pages/article/[slug].js index bc9e7688..8356a5d0 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -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) }