import Link from '@/components/Link' import { PageSEO } from '@/components/SEO' import Tag from '@/components/Tag' import siteMetadata from '@/data/siteMetadata' import { getAllFilesFrontMatter } from '@/lib/mdx' import formatDate from '@/lib/utils/formatDate' import NewsletterForm from '@/components/NewsletterForm' const MAX_DISPLAY = 5 export async function getStaticProps() { const posts = await getAllFilesFrontMatter('blog') return { props: { posts } } } export default function Home({ posts }) { return ( <>

Latest

{siteMetadata.description}

{posts.length > MAX_DISPLAY && (
All Posts →
)} {siteMetadata.newsletter.provider !== '' && (
)} ) }