feat: URL-driven catchall routing, drop sidebar nav, split export build
- app/[[...slug]]/page.tsx replaces app/page.tsx; activeSlug from URL params - SidebarNav and MobileNav removed from main layout (sections accordion is the nav) - next.config.ts: output:export controlled by STATIC_EXPORT env var instead of NODE_ENV - package.json: yarn build is standard Next.js build; yarn export is STATIC_EXPORT=true - Mock API route: force-static + generateStaticParams for output:export compatibility
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
export const dynamic = 'force-static';
|
||||
|
||||
const base = { created: '', updated: '' };
|
||||
|
||||
@@ -241,6 +241,10 @@ const FIXTURES: Record<string, unknown[]> = {
|
||||
],
|
||||
};
|
||||
|
||||
export function generateStaticParams() {
|
||||
return Object.keys(FIXTURES).map((collection) => ({ collection }));
|
||||
}
|
||||
|
||||
/**
|
||||
* Mock API route handler for PocketBase collection records.
|
||||
* Returns fixture data shaped as a PocketBase list response.
|
||||
|
||||
Reference in New Issue
Block a user