2022-10-07 09:14:10 +01:00
|
|
|
---
|
2023-01-08 19:25:23 +00:00
|
|
|
import PageLayout from "~/layouts/PageLayout.astro";
|
|
|
|
import _ from "lodash";
|
|
|
|
import { getSlugFromFile } from "~/utils.ts";
|
2023-02-11 22:53:00 +00:00
|
|
|
import ListingPage from "~/components/ListingPage.astro";
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2023-01-08 19:25:23 +00:00
|
|
|
const talks = await Astro.glob("../../talks/*.md");
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2022-10-15 16:10:41 +01:00
|
|
|
const talkCount = _(talks)
|
2022-10-16 00:57:45 +01:00
|
|
|
.flatMap((talk) => talk.frontmatter.events)
|
2023-01-08 19:25:23 +00:00
|
|
|
.size();
|
2022-10-15 16:10:41 +01:00
|
|
|
|
2022-10-07 09:14:10 +01:00
|
|
|
const sortedTalks = talks
|
2023-01-08 19:25:23 +00:00
|
|
|
.map((talk) => {
|
2023-02-11 22:53:00 +00:00
|
|
|
const slug = `/talks/${getSlugFromFile(talk.file)}`;
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2023-02-11 22:53:00 +00:00
|
|
|
return { slug, item: talk };
|
2022-10-07 09:14:10 +01:00
|
|
|
})
|
|
|
|
.sort((b, a) => {
|
|
|
|
const events = [
|
2023-02-11 22:53:00 +00:00
|
|
|
a.item.frontmatter.events[a.item.frontmatter.events.length - 1],
|
|
|
|
b.item.frontmatter.events[b.item.frontmatter.events.length - 1],
|
2023-01-08 19:25:23 +00:00
|
|
|
];
|
2022-10-07 09:14:10 +01:00
|
|
|
|
2023-01-08 19:25:23 +00:00
|
|
|
return (
|
|
|
|
new Date(events[0].date).valueOf() - new Date(events[1].date).valueOf()
|
|
|
|
);
|
|
|
|
});
|
2022-10-07 09:14:10 +01:00
|
|
|
---
|
|
|
|
|
2023-02-11 22:53:00 +00:00
|
|
|
<ListingPage items={sortedTalks} title="Talks and workshops">
|
|
|
|
<p slot="intro">
|
2023-01-08 19:25:23 +00:00
|
|
|
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
|
2023-01-31 00:17:09 +00:00
|
|
|
topics including PHP, Drupal, automated testing, Git, CSS, and systems administration.
|
2023-01-08 19:25:23 +00:00
|
|
|
</p>
|
2023-02-11 22:53:00 +00:00
|
|
|
</ListingPage>
|