From 8fbd9a95e8324cd8128e6d75b5fa536f6e631498 Mon Sep 17 00:00:00 2001 From: Davide Scaini Date: Tue, 14 Apr 2026 22:22:34 +0200 Subject: [PATCH] stop pre-building activity pages to fix OOM build failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getStaticPaths now returns [] — all /activity/{id}/ URLs are served by the activity/index.html shell via nginx try_files and hydrated by ActivityDetailLoader. Pre-rendering thousands of pages was exhausting server RAM and killing the build. The dynamic loader already handles public, unlisted, and local activities identically. --- site/src/pages/activity/[id].astro | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/site/src/pages/activity/[id].astro b/site/src/pages/activity/[id].astro index 4539f18..cffc987 100644 --- a/site/src/pages/activity/[id].astro +++ b/site/src/pages/activity/[id].astro @@ -6,6 +6,15 @@ import ActivityDetail from '../../components/ActivityDetail.svelte'; import type { BASIndex, ActivitySummary, AthleteZones } from '../../lib/types'; export async function getStaticPaths() { + // Activity pages are not pre-built — all /activity/{id}/ URLs are served + // by the activity/index.html shell via nginx try_files and loaded dynamically + // by ActivityDetailLoader. Pre-building thousands of pages at build time + // exhausts server memory. The shell handles public, unlisted, and local + // activities identically with no loss of functionality. + return []; + + // Dead code below — kept for reference only. + /* eslint-disable no-unreachable */ try { const candidates = [ process.env.BINCIO_DATA_DIR, @@ -119,6 +128,7 @@ export async function getStaticPaths() { } catch { return []; } + /* eslint-enable no-unreachable */ } const { activity, athlete } = Astro.props as { activity: ActivitySummary; athlete: AthleteZones | null };