2022-10-07 09:14:10 +01:00
---
2023-01-01 16:47:23 +00:00
import PageLayout from '~/layouts/PageLayout.astro'
2022-10-16 12:52:45 +01:00
import _ from 'lodash'
2023-01-01 16:47:23 +00:00
import { getSlugFromFile } from '~/utils.ts'
2022-10-07 09:14:10 +01:00
const talks = await Astro.glob("../../talks/*.md")
2022-10-15 16:10:41 +01:00
const talkCount = _(talks)
2022-10-16 00:57:45 +01:00
.flatMap((talk) => talk.frontmatter.events)
.size()
2022-10-15 16:10:41 +01:00
2022-10-07 09:14:10 +01:00
const sortedTalks = talks
.map(talk => {
2022-10-16 11:13:09 +01:00
const slug = getSlugFromFile(talk.file)
2022-10-07 09:14:10 +01:00
return { slug, talk }
})
.sort((b, a) => {
const events = [
a.talk.frontmatter.events[a.talk.frontmatter.events.length - 1],
b.talk.frontmatter.events[b.talk.frontmatter.events.length - 1],
]
return new Date(events[0].date).valueOf() -
new Date(events[1].date).valueOf()
})
---
<PageLayout title="Talks and workshops">
2022-10-15 16:10:41 +01:00
<p>Starting with my first talk in September 2012, I have given {talkCount} presentations and workshops at various conferences and meetups, in-person and remotely, on topics including PHP, Drupal, automated testing, Git, CSS, and systems administration.</p>
2022-10-07 09:14:10 +01:00
<div>
{sortedTalks.map((talk) => (
<article>
<a href=`/talks/${talk.slug}`>
<h2>{talk.talk.frontmatter.title}</h2>
</a>
{talk.talk.frontmatter.description}
</article>
))}
</div>
</PageLayout>