Skip to content

Commit badb493

Browse files
committed
Merge branch 'ep2025' into ep2025-packages-update
2 parents c0f1f9c + 175412a commit badb493

File tree

6 files changed

+105
-51
lines changed

6 files changed

+105
-51
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
"devDependencies": {
4747
"@types/js-yaml": "^4.0.9",
4848
"prettier": "^3.5.3",
49-
"prettier-plugin-astro": "^0.14.1"
49+
"prettier-plugin-astro": "^0.14.1",
50+
"tsx": "^4.19.3",
51+
"typescript": "^5.8.3"
5052
},
5153
"prettier": {
5254
"proseWrap": "always"

pnpm-lock.yaml

Lines changed: 56 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseHead.astro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ interface Props {
55
image?: string;
66
}
77
8+
const buildTimestamp = import.meta.env.TIMESTAMP;
9+
const gitVersion = import.meta.env.GIT_VERSION;
810
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
911
1012
const { title, description, image = "/social-card.png" } = Astro.props;
@@ -15,6 +17,8 @@ const { title, description, image = "/social-card.png" } = Astro.props;
1517
<meta name="viewport" content="width=device-width,initial-scale=1" />
1618
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
1719
<meta name="generator" content="Astro" />
20+
<meta name="build-version" content={gitVersion} />
21+
<meta name="build-timestamp" content={buildTimestamp} />
1822
<link rel="sitemap" href="/sitemap-index.xml" />
1923

2024
<meta name="referrer" content="no-referrer-when-downgrade" />

src/content/config.ts

Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,23 @@ const keynoters = defineCollection({
5959
}),
6060
});
6161

62-
// Shared data fetching function
6362
async function getCollectionsData() {
6463
const speakersData = await loadData(import.meta.env.EP_SPEAKERS_API);
6564
const sessionsData = await loadData(import.meta.env.EP_SESSIONS_API);
6665

67-
// Create indexed versions for efficient lookups
68-
const speakersById = Object.entries(speakersData).reduce(
66+
const speakersById = Object.entries(
67+
speakersData as Record<string, {}>
68+
).reduce(
6969
(acc, [id, speaker]: [string, any]) => {
7070
acc[id] = { id, ...speaker };
7171
return acc;
7272
},
7373
{} as Record<string, any>
7474
);
7575

76-
const sessionsById = Object.entries(sessionsData).reduce(
76+
const sessionsById = Object.entries(
77+
sessionsData as Record<string, {}>
78+
).reduce(
7779
(acc, [id, session]: [string, any]) => {
7880
acc[id] = { id, ...session };
7981
return acc;
@@ -93,13 +95,15 @@ const speakers = defineCollection({
9395
loader: async (): Promise<any> => {
9496
const { speakersData, sessionsById } = await getCollectionsData();
9597

96-
return Object.values(speakersData).map((speaker: any) => ({
97-
id: speaker.slug,
98-
...speaker,
99-
submissions: (speaker.submissions || [])
100-
.filter((sessionId: string) => sessionId in sessionsById)
101-
.map((sessionId: string) => sessionsById[sessionId].slug),
102-
}));
98+
return Object.values(speakersData as Record<string, {}>).map(
99+
(speaker: any) => ({
100+
id: speaker.slug,
101+
...speaker,
102+
submissions: (speaker.submissions || [])
103+
.filter((sessionId: string) => sessionId in sessionsById)
104+
.map((sessionId: string) => sessionsById[sessionId].slug),
105+
})
106+
);
103107
},
104108
schema: z.object({
105109
code: z.string(),
@@ -122,13 +126,15 @@ const sessions = defineCollection({
122126
loader: async (): Promise<any> => {
123127
const { sessionsData, speakersById } = await getCollectionsData();
124128

125-
return Object.values(sessionsData).map((session: any) => ({
126-
id: session.slug,
127-
...session,
128-
speakers: (session.speakers || [])
129-
.filter((speakerId: string) => speakerId in speakersById)
130-
.map((speakerId: string) => speakersById[speakerId].slug),
131-
}));
129+
return Object.values(sessionsData as Record<string, {}>).map(
130+
(session: any) => ({
131+
id: session.slug,
132+
...session,
133+
speakers: (session.speakers || [])
134+
.filter((speakerId: string) => speakerId in speakersById)
135+
.map((speakerId: string) => speakersById[speakerId].slug),
136+
})
137+
);
132138
},
133139
schema: z.object({
134140
code: z.string(),
@@ -159,13 +165,20 @@ const sessions = defineCollection({
159165
}),
160166
});
161167

168+
interface ScheduleData {
169+
days: Record<string, any>;
170+
}
171+
162172
const days = defineCollection({
163173
loader: async (): Promise<any[]> => {
164-
const schedule = await loadData(import.meta.env.EP_SCHEDULE_API);
174+
const schedule = (await loadData(
175+
import.meta.env.EP_SCHEDULE_API
176+
)) as ScheduleData;
165177

166-
if (Object.keys(schedule).length === 0) {
167-
return schedule;
178+
if (!schedule || Object.keys(schedule).length === 0) {
179+
return [];
168180
}
181+
169182
return Object.entries(schedule.days).map(([date, data]: [string, any]) => ({
170183
id: date,
171184
...data,

src/layouts/ScheduleLayout.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@ const { title, description } = Astro.props;
1515
<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&display=block" rel="stylesheet">
1616
</Fragment>
1717
<>
18+
19+
<p class="bg-[rgb(255,252,204)] text-[rgb(153,101,21)] border-l-4 border-[rgb(255,204,0)] p-4 text-sm flex items-center space-x-2">
20+
<i class="fas fa-exclamation-triangle"></i>
21+
<span><strong>Important:</strong> This is an early version of the schedule and may still change. If you're planning travel around specific sessions, please keep that in mind.</span>
22+
</p>
1823
<Headline as="h2" id="schedule-main" title="2025 Schedule" />
24+
1925
<div class="layout-wrapper2">
2026
<slot />
2127
</div>

0 commit comments

Comments
 (0)