feat: toc for blog post

This commit is contained in:
Timothy Lin committed 2021-08-06 22:13:30 +08:00
1 parent 304318376c
commit afbc2d9c66
7 files changed
+52 -1

No files matched your search

+2 -1
View File
@@ -39,13 +39,14 @@ export async function getStaticProps({ params }) {
}
export default function Blog({ post, authorDetails, prev, next }) {
const { mdxSource, frontMatter } = post
const { mdxSource, toc, frontMatter } = post
return (
<>
{frontMatter.draft !== true ? (
<MDXLayoutRenderer
layout={frontMatter.layout || DEFAULT_LAYOUT}
toc={toc}
mdxSource={mdxSource}
frontMatter={frontMatter}
authorDetails={authorDetails}