---
import Post from '../../layouts/Post.astro';
import { entrySlug, getArticles } from '../../lib/site';

export async function getStaticPaths() {
  const posts = await getArticles();
  return posts.map((post) => ({
    params: { slug: entrySlug(post) },
    props: { post },
  }));
}

const { post } = Astro.props;
---

<Post post={post} />
