aboutsummaryrefslogtreecommitdiff
path: root/src/pages/index.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/index.astro')
-rw-r--r--src/pages/index.astro18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pages/index.astro b/src/pages/index.astro
new file mode 100644
index 0000000..bc98c67
--- /dev/null
+++ b/src/pages/index.astro
@@ -0,0 +1,18 @@
+---
+import Layout from "../layouts/PageLayout.astro";
+import { getCollection } from "astro:content";
+
+const posts = await getCollection("blog");
+---
+
+<Layout>
+ <ul>
+ {
+ posts.map((post) => (
+ <li>
+ <a href={`/blog/${post.slug}`}>{post.data.title}</a>
+ </li>
+ ))
+ }
+ </ul>
+</Layout>