Skip to content

Commit 1f15879

Browse files
authored
Merge branch 'ep2025' into ep2025-issue-1089-sessions
2 parents 626175e + 425a1b8 commit 1f15879

File tree

16 files changed

+93
-77
lines changed

16 files changed

+93
-77
lines changed

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EP_SESSIONS_API="https://static.europython.eu/programme/ep2025/releases/current/sessions.json"
2+
EP_SPEAKERS_API="https://static.europython.eu/programme/ep2025/releases/current/speakers.json"

.env.preview

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EP_SESSIONS_API="https://static.europython.eu/programme/ep2025/releases/current/sessions.json"
2+
EP_SPEAKERS_API="https://static.europython.eu/programme/ep2025/releases/current/speakers.json"

.env.production

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
EP_SESSIONS_API="https://static.europython.eu/programme/ep2025/releases/current/sessions.json"
2+
EP_SPEAKERS_API="https://static.europython.eu/programme/ep2025/releases/current/speakers.json"

astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default defineConfig({
2020
},
2121
resolve: {
2222
alias: {
23+
"@utils": path.resolve("./src/utils"),
2324
"@data": path.resolve("./src/data"),
2425
"@components": path.resolve("./src/components"),
2526
"@sections": path.resolve("./src/components/sections"),
@@ -60,6 +61,7 @@ export default defineConfig({
6061
"/sponsor/": "/sponsorship/sponsor/",
6162
"/voting/": "/programme/voting/",
6263
"/wasm-summit/": "/programme/wasm-summit/",
64+
"/programme/sessions/": "/sessions/",
6365
},
6466
integrations: [
6567
preload(),

src/components/keynoters/keynoters.astro

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const placeholders = Math.max(0, 5 - keynoters.length);
8585
{
8686
keynoters
8787
.sort((a, b) => a.data.order - b.data.order)
88-
.map((keynoter, index) => (
88+
.map((keynoter, _index) => (
8989
<Keynoter
9090
name={keynoter.data.name}
9191
slug={keynoter.slug}
@@ -95,7 +95,6 @@ const placeholders = Math.max(0, 5 - keynoters.length);
9595
order={keynoter.data.order}
9696
class:list={[
9797
"w-full sm:w-[calc(50%-1rem)] md:w-[calc(30%-1rem)]",
98-
{ "md:ml-[10%]": index === 0 },
9998
]}
10099
/>
101100
))

src/components/ticket-tiers/ticket-tiers.astro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const tiers: TicketTierProps[] = [
4848
{
4949
text: "Access to in-person networking opportunities during the tutorial days",
5050
},
51-
{ text: "Access to free childcare for children aged 18 months and older" },
51+
{ text: "Access to free childcare for children aged 19 months and older" },
5252
{ text: "Conference T-shirt included" },
5353
{
5454
text: "<strong>Limited to only 300, due to tutorial capacity</strong>",
@@ -83,7 +83,7 @@ const tiers: TicketTierProps[] = [
8383
{
8484
text: "Access to in-person networking opportunities during the main conference days",
8585
},
86-
{ text: "Access to free childcare for children aged 18 months and older" },
86+
{ text: "Access to free childcare for children aged 19 months and older" },
8787
{ text: "Conference T-shirt included" },
8888
],
8989
},
@@ -112,7 +112,7 @@ const tiers: TicketTierProps[] = [
112112
{
113113
text: "Access to in-person networking opportunities throughout the entire conference",
114114
},
115-
{ text: "Access to free childcare for children aged 18 months and older" },
115+
{ text: "Access to free childcare for children aged 19 months and older" },
116116
{ text: "Conference T-shirt included" },
117117
{
118118
text: "<strong>Limited to only 300, due to tutorial capacity</strong>",

src/content/config.ts

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,8 @@
11
import { defineCollection, reference, z } from "astro:content";
2-
import fs from "fs/promises";
3-
import path from "path";
2+
import { loadData } from "../utils/dataLoader";
43

5-
const CACHE_DIR = ".cache/data";
6-
7-
async function ensureCacheDir() {
8-
await fs.mkdir(CACHE_DIR, { recursive: true });
9-
}
10-
11-
async function fetchWithCache(url: string, filename: string): Promise<Buffer> {
12-
const filePath = path.join(CACHE_DIR, filename);
13-
14-
try {
15-
// Return cached if available
16-
const data = await fs.readFile(filePath);
17-
console.log(`Fetch from cache: ${filePath}`);
18-
return data;
19-
} catch {
20-
const res = await fetch(url);
21-
if (!res.ok) throw new Error(`Failed to fetch: ${url}`);
22-
23-
const arrayBuffer = await res.arrayBuffer();
24-
const buffer: Buffer = Buffer.from(arrayBuffer);
25-
await fs.writeFile(filePath, new Uint8Array(buffer));
26-
return buffer;
27-
}
28-
}
4+
const mode = import.meta.env.MODE;
5+
console.log(`\x1b[35m[EP]\x1b[0m Current MODE: \x1b[1m\x1b[34m${mode}\x1b[0m`);
296

307
const tiers = [
318
"Keystone",
@@ -83,32 +60,19 @@ const keynoters = defineCollection({
8360

8461
// Shared data fetching function
8562
async function getCollectionsData() {
86-
// Only fetch if not already cached
87-
await ensureCacheDir();
88-
89-
const speakersBuffer = await fetchWithCache(
90-
"https://gist.githubusercontent.com/nikoshell/d8efd41f90961cc6298519c0eec04843/raw/d13a7b1d35f61be1773404e7faf8395dd4862313/speakers.json",
91-
"speakers.json"
92-
);
93-
94-
const sessionsBuffer = await fetchWithCache(
95-
"https://gist.githubusercontent.com/egeakman/eddfb15f32ae805e8cfb4c5856ae304b/raw/466f8c20c17a9f6c5875f973acaec60e4e4d0fae/sessions.json",
96-
"sessions.json"
97-
);
98-
99-
const cachedSpeakersData = JSON.parse(speakersBuffer.toString("utf-8"));
100-
const cachedSessionsData = JSON.parse(sessionsBuffer.toString("utf-8"));
63+
const speakersData = await loadData(import.meta.env.EP_SPEAKERS_API);
64+
const sessionsData = await loadData(import.meta.env.EP_SESSIONS_API);
10165

10266
// Create indexed versions for efficient lookups
103-
const speakersById = Object.entries(cachedSpeakersData).reduce(
67+
const speakersById = Object.entries(speakersData).reduce(
10468
(acc, [id, speaker]: [string, any]) => {
10569
acc[id] = { id, ...speaker };
10670
return acc;
10771
},
10872
{} as Record<string, any>
10973
);
11074

111-
const sessionsById = Object.entries(cachedSessionsData).reduce(
75+
const sessionsById = Object.entries(sessionsData).reduce(
11276
(acc, [id, session]: [string, any]) => {
11377
acc[id] = { id, ...session };
11478
return acc;
@@ -117,8 +81,8 @@ async function getCollectionsData() {
11781
);
11882

11983
return {
120-
speakersData: cachedSpeakersData,
121-
sessionsData: cachedSessionsData,
84+
speakersData,
85+
sessionsData,
12286
speakersById,
12387
sessionsById,
12488
};
@@ -145,7 +109,7 @@ const speakers = defineCollection({
145109
submissions: z.array(reference("sessions")),
146110
affiliation: z.string().nullable(),
147111
homepage: z.string().nullable(),
148-
gitx: z.string().nullable(),
112+
gitx_url: z.string().url().nullable(),
149113
linkedin_url: z.string().url().nullable(),
150114
mastodon_url: z.string().url().nullable(),
151115
bluesky_url: z.string().url().nullable(),
File renamed without changes.

src/content/pages/childcare.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import childcareBalls from "./images/childcare-balls.jpg";
1212

1313
We’re committed to making EuroPython as inclusive and accessible as possible — and that includes supporting parents attending the conference.
1414

15-
🧸 **Free childcare** will be available for children aged **18 months and older**.
15+
🧸 **Free childcare** will be available for children aged **19 months and older**.
1616
Our professional childcare providers will offer a fun, safe, and engaging environment for your little ones during the conference.
1717

18-
👶 Children under 18 months are welcome too! While we don’t provide dedicated care for infants, you’re very welcome to bring your own caregiver — whether it’s a nanny, grandparent, or another family member. They’re also welcome to use our designated family-friendly space during the event.
18+
👶 Children under 19 months are welcome too! While we don’t provide dedicated care for infants, you’re very welcome to bring your own caregiver — whether it’s a nanny, grandparent, or another family member. They’re also welcome to use our designated family-friendly space during the event.
1919

2020
If you prefer, you can hire a professional nanny at your own cost through our childcare provider.
2121

src/content/pages/tickets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ If you're purchasing multiple tickets, please consider sponsoring the event!
127127
<span>☕ Every ticket includes break refreshments and a light lunch for each day.</span>
128128
</li>
129129
<li class="flex items-start">
130-
<span>👶 Free childcare is available at the conference for children aged 18 months and older. For more info, check out our [childcare](/childcare) page. Please make sure to register a ticket for yourself and select how many children will require childcare at checkout.</span>
130+
<span>👶 Free childcare is available at the conference for children aged 19 months and older. For more info, check out our [childcare](/childcare) page. Please make sure to register a ticket for yourself and select how many children will require childcare at checkout.</span>
131131
</li>
132132
<li class="flex items-start">
133133
<span>⏰ We encourage you to book your ticket early. This makes it easier for us to plan for the event and arrange important things like catering, badge printing, and other logistics.</span>

0 commit comments

Comments
 (0)