diff --git a/src/pages/talks/index.astro b/src/pages/talks/index.astro index 197b76e4..fec76057 100644 --- a/src/pages/talks/index.astro +++ b/src/pages/talks/index.astro @@ -1,17 +1,18 @@ --- import ListingPage from "~/components/ListingPage.astro"; +import Markdown from "~/components/Markdown.astro"; import _ from "lodash"; import { getCollection } from "astro:content"; -import Markdown from "~/components/Markdown.astro"; const talks = await getCollection("talk"); +const today = new Date().valueOf(); + const talkCount = _(talks) .flatMap((talk) => talk.data.events) + .filter((event): boolean => new Date(event.date).valueOf() <= today) .size(); -const today = new Date().valueOf(); - const sortedTalks = talks .map((talk) => { const slug = `/talks/${talk.slug}`;