chore: sync with v0.3.4

This commit is contained in:
Timothy Lin
2021-05-29 17:52:13 +08:00
11 changed files with 194 additions and 143 deletions

View File

@@ -23,7 +23,7 @@ export async function getStaticProps({ params }) {
const postIndex = allPosts.findIndex((post) => formatSlug(post.slug) === params.slug.join('/'))
const prev = allPosts[postIndex + 1] || null
const next = allPosts[postIndex - 1] || null
const post = await getFileBySlug('blog', params.slug)
const post = await getFileBySlug('blog', params.slug.join('/'))
const authorList = post.frontMatter.authors || ['default']
const authorPromise = authorList.map(async (author) => {
const authorResults = await getFileBySlug('authors', [author])