mirror of
https://github.com/Xevion/undefined.behavio.rs.git
synced 2025-12-10 02:09:01 -06:00
22 lines
584 B
Plaintext
22 lines
584 B
Plaintext
---
|
|
import { getCollection } from "astro:content";
|
|
import General from "@layouts/General.astro";
|
|
import Summary from "@components/Summary.astro";
|
|
const posts = (await getCollection("blog")).filter(entry => !entry.data.draft);
|
|
posts.sort((a, b) => new Date(b.data.pubDate).getTime() - new Date(a.data.pubDate).getTime());
|
|
---
|
|
|
|
<General>
|
|
{
|
|
posts.map((post) => (
|
|
<Summary
|
|
url={`/posts/${post.slug}`}
|
|
description={post.data.description}
|
|
date={post.data.pubDate}
|
|
title={post.data.title}
|
|
tags={post.data.tags}
|
|
/>
|
|
))
|
|
}
|
|
</Base>
|