mirror of
https://github.com/valentineus/popov.link.git
synced 2025-07-04 00:20:26 +03:00
Initial Astro project
This commit is contained in:
18
src/pages/index.astro
Normal file
18
src/pages/index.astro
Normal file
@ -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>
|
Reference in New Issue
Block a user