--- import BaseLayout from "../../layouts/BaseLayout.astro"; import { getCollection } from "astro:content"; import { sortItem } from "../../utils/sort.js"; import * as collections from "../../content/config"; import type { PostCollection } from "../../types"; export async function getStaticPaths() { return Object.keys(collections.collections) .filter((category) => category !== "git" && category !== "gists") .map((category) => ({ params: { category }, })); } const category = Astro.params.category as PostCollection; const title = "Barrett Ruth"; const posts = await getCollection(category); posts.sort(sortItem); ---
{ posts.map((p) => ( {p.data.title} )) }