--- layout: '@/layouts/Doc.astro' title: 🎙️ Talks --- import { getCollection } from 'astro:content' import { legacyTalks } from '@/legacy-talks' export const collected = (await getCollection('docs')) .filter( (doc) => doc.id.startsWith('talks/') && !doc.id.endsWith('talks/index.mdx') && doc.data.date && doc.data.title && !doc.data.draft, ) .map((doc) => ({ date: new Date(doc.data.date), title: doc.data.shortTitle ?? doc.data.title, url: `/${doc.id.replace(/\/index\.(mdx?|md)$/, '/')}`, location: doc.data.location ?? '', locationUrl: doc.data.locationUrl ?? '', })) export const legacy = legacyTalks.map((t) => ({ date: new Date(t.date), title: t.title, url: t.url, location: t.location ?? '', locationUrl: t.locationUrl ?? '', })) export const talks = [...collected, ...legacy].sort( (a, b) => b.date.getTime() - a.date.getTime(), ) Sam Foreman > [!TIP] HTML ⇆ Reveal.js > > Convert any talk page to a Reveal.js deck by appending `/slides`: > [`/talks/ai-for-science-2024/`](/talks/ai-for-science-2024/) → > [`/talks/ai-for-science-2024/slides`](/talks/ai-for-science-2024/slides)
| Date | Title | Location |
|---|---|---|
| {(() => { const d = t.date; return `${d.getUTCFullYear()}-${String(d.getUTCMonth()+1).padStart(2,'0')}-${String(d.getUTCDate()).padStart(2,'0')}`; })()} | {t.title} | {t.locationUrl ? ({t.location}) : t.location} |