summaryrefslogtreecommitdiff
path: root/src/components/PostList.astro
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/PostList.astro')
-rw-r--r--src/components/PostList.astro15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/PostList.astro b/src/components/PostList.astro
new file mode 100644
index 0000000..a537e43
--- /dev/null
+++ b/src/components/PostList.astro
@@ -0,0 +1,15 @@
+---
+const posts = await Astro.glob("../pages/blog/posts/*.md");
+---
+
+<div>
+ <ul class="postList">
+ {
+ posts.map((post) => (
+ <li>
+ <a href={post.url}>{post.frontmatter.title}</a>
+ </li>
+ ))
+ }
+ </ul>
+</div>