--- import { getCollection, getEntry } from "astro:content"; export interface Props { activePath: string; } const allGuides = await getCollection("guides"); const sortedGuides = allGuides.sort((a, b) => a.data.sort - b.data.sort); const groupedGuides = sortedGuides.reduce((acc, curr) => { const { groupTitle } = curr.data; acc[groupTitle] = acc[groupTitle] || []; acc[groupTitle].push(curr); return acc; }, {}); const { activePath } = Astro.props; ---
{Object.keys(groupedGuides).map(groupTitle => { const guides = groupedGuides[groupTitle]; return ( <>

{ groupTitle }

); })}