---
import CollectionLayout from "@components/poetry/CollectionLayout.astro";
import { getEntries } from "@lib/contentParser";
import { sortByDate } from "@lib/sortFunctions";
import type { PoetryEntry } from "@/types";
import { getIndex } from "@lib/contentParser";

const entryIndex = (await getIndex("poetry")) as PoetryEntry;
const entries = (await getEntries("poetry", sortByDate)) as PoetryEntry[];
---

<CollectionLayout entryIndex={entryIndex} entries={entries} />
