import Head from 'next/head' import styles from '../styles/Home.module.css' import HeaderNav from '../lib/HeaderNav' import HeroImage from '../lib/HeroImage' import PostsList from '../lib/PostsList' import { getSortedPostsData } from '../lib/posts' import { serialize } from 'next-mdx-remote/serialize' export async function getStaticProps() { const allPostsData = await getSortedPostsData(serialize) return { props: { allPostsData, } } } export default function Posts({ allPostsData }) { return (