import type { CollectionEntry } from "astro:content"; type Props = { posts: CollectionEntry<"blog">[]; }; const categoryColors: Record = { Programming: "bg-ctp-mauve text-ctp-base", Linguistics: "bg-ctp-green text-ctp-base", Judaism: "bg-ctp-blue text-ctp-base", General: "bg-ctp-surface2 text-ctp-text" }; export default function Posts({ posts }: Props) { return (
{posts.map((post: CollectionEntry<"blog">) => { return (
{post.data.categories.map((tag) => { return ( {tag} ); })} {post.data.publishedTime.toLocaleDateString()}
{post.data.title}
); })}
); }