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