You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
904 B

---
1 year ago
import { getCollection } from "astro:content";
const posts = (await getCollection("blog"))
.filter(
(entry) => !entry.data.wip || process.env.NODE_ENV === "development"
)
.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
---
<div>
1 year ago
{
posts.map((post) => {
1 year ago
return (
<a href={`blog/${post.slug}`}>
<div
class="main-content"
style="margin-bottom: 10px; font-size: 125%;"
>
<div>
<b>{post.data.title}</b> -{" "}
{post.data.pubDate.toDateString()}
<br />
1 year ago
</div>
1 year ago
<i>{post.data.description}</i>
</div>
</a>
);
1 year ago
})
}
</div>