Only include pages for projects that have body
This commit is contained in:
@@ -12,7 +12,10 @@ import {
|
|||||||
} from "@/lib/utils";
|
} from "@/lib/utils";
|
||||||
|
|
||||||
export async function getStaticPaths() {
|
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) => ({
|
return projects.map((project) => ({
|
||||||
params: { slug: project.id },
|
params: { slug: project.id },
|
||||||
props: { project }
|
props: { project }
|
Reference in New Issue
Block a user