--- import BaseLayout from './BaseLayout.astro'; import { getCollection } from 'astro:content'; import { fundamentalsOrder, referenceOrder } from '../config/learning-hub'; interface Props { title: string; description?: string; estimatedReadingTime?: string; lastUpdated?: string; tags?: string[]; } const { title, description, estimatedReadingTime, lastUpdated, tags } = Astro.props; const base = import.meta.env.BASE_URL; const articles = await getCollection('learning-hub'); const fundamentals = articles .filter((a) => fundamentalsOrder.includes(a.id)) .sort((a, b) => fundamentalsOrder.indexOf(a.id) - fundamentalsOrder.indexOf(b.id)); const reference = articles .filter((a) => referenceOrder.includes(a.id)) .sort((a, b) => referenceOrder.indexOf(a.id) - referenceOrder.indexOf(b.id)); const currentSlug = Astro.url.pathname.replace(/\/$/, '').split('/').pop(); ---