import type { GetStaticProps, NextPage } from 'next' import Link from 'next/link' import date from 'date-and-time' import { Head } from 'components/Head' import { Header } from 'components/Header' import type { FooterProps } from 'components/Footer' import { Footer } from 'components/Footer' import { ShadowContainer } from 'components/design/ShadowContainer' import type { PostMetadata } from 'utils/blog' const blogDescription = 'The latest news about my journey of learning computer science.' interface BlogPageProps extends FooterProps { posts: PostMetadata[] } const BlogPage: NextPage = (props) => { const { version, posts } = props return ( <>

Blog

{blogDescription}

{posts.map((post, index) => { const postPublishedOn = date.format( new Date(post.frontmatter.publishedOn), 'DD/MM/YYYY' ) return (

{post.frontmatter.title}

{postPublishedOn}

{post.frontmatter.description}

) })}