import Link from 'next/link'; import React from 'react'; import Layout from '../../components/layout'; import Pages from '../../public/pages.json'; import cachePostLinkData from '../../util/post-cache'; function HomePage({posts}: any) { Pages.sort((x, y) => { return ('' + x.title).localeCompare(y.title) }); return ( {posts.map((post: any) => { return
{post.title}
[{ (new Date(post.last_updated)).toLocaleString()}]
})}
) } export async function getStaticProps() { return { props: {posts: cachePostLinkData()} }; } export default HomePage;