update
Some checks failed
Deploy to SFTP Server / build (push) Has been cancelled

This commit is contained in:
Max Richter
2025-10-04 14:07:46 +02:00
parent a1b8eb22e5
commit 61251e2c85
2 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ const collection = "resources/Recipes";
export async function getStaticPaths() { export async function getStaticPaths() {
const recipes = await memorium.listResource("Recipes"); const recipes = await memorium.listResource("Recipes");
const paths = recipes.content.filter(res =>res.content).map((recipe: any) => { const paths = recipes.content?.filter(res =>res.content).map((recipe: any) => {
return { return {
params: { params: {
recipeName: recipe.name.replace(/\.md$/, ""), recipeName: recipe.name.replace(/\.md$/, ""),
@@ -19,7 +19,7 @@ export async function getStaticPaths() {
}; };
}); });
return paths; return paths ?? [];
} }
const recipeResponse = await memorium.listResource( const recipeResponse = await memorium.listResource(

View File

@@ -9,7 +9,7 @@ const recipes = await memorium.listResource("Recipes");
<Layout title="Max Richter"> <Layout title="Max Richter">
{ {
recipes.content recipes.content
.filter((res) => res.content) ?.filter((res) => res.content)
.map((recipe: any) => ( .map((recipe: any) => (
<HeroCard <HeroCard
post={{ post={{