WIP
This commit is contained in:
23
src/pages/resources/recipes/index.astro
Normal file
23
src/pages/resources/recipes/index.astro
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import HeroCard from "@components/HeroCard.astro";
|
||||
|
||||
const response = await fetch("http://localhost:8080/resources?name=Recipes/*");
|
||||
const recipes = await response.json();
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
{
|
||||
recipes.map((recipe: any) => (
|
||||
<HeroCard
|
||||
post={{
|
||||
collection: "resources/recipes",
|
||||
id: recipe.identifier.replace("Recipes/", "").replace(/\.md$/, ""),
|
||||
data: {
|
||||
title: recipe.name,
|
||||
},
|
||||
}}
|
||||
/>
|
||||
))
|
||||
}
|
||||
</Layout>
|
||||
Reference in New Issue
Block a user