diff --git a/app/[[...slug]]/page.tsx b/app/[[...slug]]/page.tsx index 6cc7a73..4fa0ef0 100644 --- a/app/[[...slug]]/page.tsx +++ b/app/[[...slug]]/page.tsx @@ -8,11 +8,15 @@ import { SectionsAccordion } from '$widgets/SectionsAccordion'; * Optional catchall: `/` → first section, `/:slug` → that section. */ export async function generateStaticParams() { - const { items: sections } = await getCollection('sections', { - sort: 'order', - tags: ['sections'], - }); - return [{}, ...sections.map((s) => ({ slug: [s.slug] }))]; + try { + const { items: sections } = await getCollection('sections', { + sort: 'order', + }); + return [{}, ...sections.map((s) => ({ slug: [s.slug] }))]; + } catch (err) { + console.warn('[generateStaticParams] PocketBase unreachable at build — deferring to runtime ISR', err); + return []; + } } type Props = {