--- import BaseLayout from "./BaseLayout.astro"; import { getTopicColor } from "../utils/colors.js"; interface Props { frontmatter: { title: string; description?: string; date?: string; useKatex?: boolean; useD3?: boolean; scripts?: string[]; }; } const { frontmatter, post } = Astro.props; const { title, description, useKatex = false, useD3 = false } = frontmatter; const filePath = post?.id || ""; const category = filePath.split("/")[0]; const topicColor = getTopicColor(category); --- { useKatex && ( ) } { useD3 && ( ) }

{title}

{frontmatter.date && }
{frontmatter.scripts?.map(script => ( ))}