--- import { getCollection, render } from "astro:content"; import type { GetStaticPaths, InferGetStaticPropsType } from "astro"; import ExperienceTags from "@/components/ExperienceTags.astro"; import FormattedDate from "@/components/FormattedDate.astro"; import TagList from "@/components/TagList.astro"; import YouTube from "@/components/YouTube.astro"; import PageLayout from "@/layouts/Base.astro"; import { breadcrumbList, videoSchema } from "@/utils/seo"; export const getStaticPaths = (async () => { const talks = await getCollection("speaking"); return talks.map((talk) => ({ params: { slug: talk.id }, props: { talk }, })); }) satisfies GetStaticPaths; type Props = InferGetStaticPropsType; const { talk } = Astro.props as Props; const { Content } = await render(talk); const { title, description, youtubeId, event, publishDate, experiences, tags } = talk.data; const path = `/speaking/${talk.id}/`; const ogImage = `/og-image/speaking/${talk.id}.png`; const schema = [ breadcrumbList([ { name: "Home", path: "/" }, { name: "Speaking", path: "/speaking/" }, { name: title, path }, ]), videoSchema({ title, description, path, thumbnail: `https://i.ytimg.com/vi/${youtubeId}/hqdefault.jpg`, uploadDate: publishDate, embedUrl: `https://www.youtube.com/embed/${youtubeId}`, contentUrl: `https://www.youtube.com/watch?v=${youtubeId}`, }), ]; const meta = { description, keywords: tags, ogImage, schema, title }; ---

{title}

{event && ` ยท ${event}`}

{experiences.length > 0 &&
}