--- import { type CollectionEntry, getCollection } from "astro:content"; import PageLayout from "@layouts/PageLayout.astro"; import Container from "@components/Container.astro"; import FormattedDate from "@components/FormattedDate.astro"; import BackToPrev from "@components/BackToPrev.astro"; export async function getStaticPaths() { const lists = (await getCollection("lists")) .filter((list) => !list.data.draft) .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); return lists.map((list) => ({ params: { slug: list.slug }, props: list, })); } type Props = CollectionEntry<"lists">; const list = Astro.props; const { Content } = await list.render(); ---
Back to lists
{ list.data.tags && list.data.tags.length > 0 && (
{list.data.tags?.map((tag, index) => ( <> {tag} {index < list.data.tags!.length - 1 && ", "} ))}
) }
{list.data.title}
Last updated