fix(build): mark Payload-fetching pages as force-dynamic
All checks were successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful

Static prerender at build time fails when PAYLOAD_SECRET/DATABASE_URI
are unset. About/Projects/Contact + project detail all read from
Payload at request time — make that explicit.
This commit is contained in:
2026-04-14 19:51:05 -05:00
parent ff4d10ef24
commit 3827e6bc4b
4 changed files with 5 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import { RichText } from "@payloadcms/richtext-lexical/react";
import { GridOverlay, TechChip } from "@/components/site"; import { GridOverlay, TechChip } from "@/components/site";
export const metadata: Metadata = { title: "About" }; export const metadata: Metadata = { title: "About" };
export const dynamic = "force-dynamic";
type MediaDoc = { type MediaDoc = {
url?: string | null; url?: string | null;

View File

@@ -7,6 +7,7 @@ import { GridOverlay, StatusTerminal } from "@/components/site";
import { ContactForm } from "./ContactForm"; import { ContactForm } from "./ContactForm";
export const metadata: Metadata = { title: "Contact" }; export const metadata: Metadata = { title: "Contact" };
export const dynamic = "force-dynamic";
const ICON_MAP = { const ICON_MAP = {
email: Mail, email: Mail,

View File

@@ -8,6 +8,8 @@ import { RichText } from "@payloadcms/richtext-lexical/react";
import { GridOverlay, TechChip } from "@/components/site"; import { GridOverlay, TechChip } from "@/components/site";
import type { Project, Media } from "@/payload-types"; import type { Project, Media } from "@/payload-types";
export const dynamic = "force-dynamic";
type Params = { slug: string }; type Params = { slug: string };
function isMedia(val: unknown): val is Media { function isMedia(val: unknown): val is Media {

View File

@@ -9,6 +9,7 @@ export const metadata: Metadata = {
description: description:
"A curated selection of industrial infrastructure, research platforms, and independent consultancy projects engineered for high-performance environments.", "A curated selection of industrial infrastructure, research platforms, and independent consultancy projects engineered for high-performance environments.",
}; };
export const dynamic = "force-dynamic";
export default async function ProjectsIndexPage() { export default async function ProjectsIndexPage() {
const payload = await getPayload({ config }); const payload = await getPayload({ config });