jonbio/pages/about.js

20 lines
518 B
JavaScript
Raw Normal View History

import { MDXLayoutRenderer } from '@/components/MDXComponents'
2021-05-16 15:22:04 +08:00
import { getFileBySlug } from '@/lib/mdx'
export async function getStaticProps() {
const authorDetails = await getFileBySlug('authors', ['default'])
return { props: { authorDetails } }
}
export default function About({ authorDetails }) {
const { mdxSource, frontMatter } = authorDetails
2021-01-09 17:50:45 +08:00
return (
<MDXLayoutRenderer
layout={frontMatter.layout || 'AuthorLayout'}
mdxSource={mdxSource}
frontMatter={frontMatter}
/>
2021-01-09 17:50:45 +08:00
)
}