---
import CollectionLayout from "@components/docs/CollectionLayout.astro";
import { getIndex, getGroups } from "@lib/contentParser";
import type { DocsEntry } from "@/types";
import { sortByTitle } from "@lib/sortFunctions";

const collectionIndex = (await getIndex("docs")) as DocsEntry;
const groupIndices = (await getGroups("docs", sortByTitle)) as DocsEntry[];
---

<CollectionLayout entries={groupIndices} collectionIndex={collectionIndex} />
