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
32 lines
904 B
---
|
|
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>
|
|
{
|
|
posts.map((post) => {
|
|
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 />
|
|
</div>
|
|
<i>{post.data.description}</i>
|
|
</div>
|
|
</a>
|
|
);
|
|
})
|
|
}
|
|
</div>
|