fix: make some changes
All checks were successful
Deploy to SFTP Server / build (push) Successful in 17m9s

This commit is contained in:
Max Richter
2025-10-22 13:48:16 +02:00
parent 038e78f27d
commit 1c3f136f57

View File

@@ -14,7 +14,7 @@ export async function getStaticPaths() {
const paths = await Promise.all( const paths = await Promise.all(
resourceTypes.map(async (resourceType) => { resourceTypes.map(async (resourceType) => {
const resources = await memorium.listResource(resourceType.id); const resources = await memorium.listResource(resourceType.id);
return resources?.content.map((res: any) => { return resources?.content?.map((res: any) => {
return { return {
params: { params: {
resourceType: resourceType.id, resourceType: resourceType.id,
@@ -34,6 +34,9 @@ export async function getStaticPaths() {
const resource = await memorium.listResource( const resource = await memorium.listResource(
`${resourceType}/${resourceName}.md`, `${resourceType}/${resourceName}.md`,
); );
const ingredients = resource?.content?.recipeIngredient || [];
const instructions = resource?.content?.recipeInstructions || [];
--- ---
<Layout title="Max Richter"> <Layout title="Max Richter">
@@ -59,7 +62,7 @@ const resource = await memorium.listResource(
<h2>Ingredients</h2> <h2>Ingredients</h2>
<ul> <ul>
{ {
resource?.content?.recipeIngredient.map((ingredient) => ( ingredients.map((ingredient) => (
<li>{markdownToText(ingredient)}</li> <li>{markdownToText(ingredient)}</li>
)) ))
} }
@@ -68,7 +71,7 @@ const resource = await memorium.listResource(
<h2>Steps</h2> <h2>Steps</h2>
<ol> <ol>
{ {
resource?.content?.recipeInstructions.map((ingredient) => ( instructions.map((ingredient) => (
<li>{markdownToText(ingredient)}</li> <li>{markdownToText(ingredient)}</li>
)) ))
} }