--- import Breadcrumbs from '../components/Breadcrumbs.astro'; import RoadmapBanner from '../components/RoadmapBanner.astro'; import BaseLayout from '../layouts/BaseLayout.astro'; import { getTopicFiles, TopicFileType } from '../lib/topic'; import '../styles/prism.css'; export async function getStaticPaths() { const topicPathMapping = await getTopicFiles(); return Object.keys(topicPathMapping).map((topicSlug) => ({ params: { topicId: topicSlug.replace(/^\//, '') }, props: topicPathMapping[topicSlug], })); } const { topicId } = Astro.params; const { file, breadcrumbs, roadmapId, roadmap } = Astro.props as TopicFileType; ---