Only include pages for projects that have body
This commit is contained in:
@@ -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 }
|
Reference in New Issue
Block a user