--- import BaseLayout from '../../layouts/BaseLayout.astro'; import { getCollection } from 'astro:content'; import { fundamentalsOrder, referenceOrder } from '../../config/learning-hub'; const base = import.meta.env.BASE_URL; const articles = await getCollection('learning-hub'); const fundamentalsOrderIndex = {}; fundamentalsOrder.forEach((id, index) => { fundamentalsOrderIndex[id] = index; }); const referenceOrderIndex = {}; referenceOrder.forEach((id, index) => { referenceOrderIndex[id] = index; }); const fundamentals = articles .filter((a) => fundamentalsOrder.includes(a.id)) .sort((a, b) => fundamentalsOrderIndex[a.id] - fundamentalsOrderIndex[b.id]); const reference = articles .filter((a) => referenceOrder.includes(a.id)) .sort((a, b) => referenceOrderIndex[a.id] - referenceOrderIndex[b.id]); ---