Only include pages for projects that have body

This commit is contained in:
2025-08-11 08:44:03 +09:30
parent 9f4bc341e1
commit 1666351268

View File

@@ -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 }