From 166635126805659eb8dc2223721a66c66af26902 Mon Sep 17 00:00:00 2001 From: Nathan Cummins Date: Mon, 11 Aug 2025 08:44:03 +0930 Subject: [PATCH] Only include pages for projects that have body --- src/pages/projects/{[...slug].astro => [slug].astro} | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename src/pages/projects/{[...slug].astro => [slug].astro} (93%) diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[slug].astro similarity index 93% rename from src/pages/projects/[...slug].astro rename to src/pages/projects/[slug].astro index 69e90dd..c429b7b 100644 --- a/src/pages/projects/[...slug].astro +++ b/src/pages/projects/[slug].astro @@ -12,7 +12,10 @@ import { } from "@/lib/utils"; export async function getStaticPaths() { - const projects = await getCollection("projects"); + const projects = await getCollection("projects", ({ body }) => { + return body && body.trim().length > 0; + }); + return projects.map((project) => ({ params: { slug: project.id }, props: { project }