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.
31 lines
1.0 KiB
31 lines
1.0 KiB
---
|
|
const allPosts = await Astro.glob("../pages/blog/*.md*");
|
|
const posts = allPosts
|
|
.map((item) => Object.assign({}, item.frontmatter, { url: item.url }))
|
|
//@ts-expect-error cease this bitch crying, what do you mean i shouldn't implicitly convert Dates to Numbers
|
|
.sort((a, b) => new Date(b.pubDate) - new Date(a.pubDate));
|
|
---
|
|
|
|
<div>
|
|
{
|
|
posts.map((post) => {
|
|
if (!post.wip || process.env.NODE_ENV === "development") {
|
|
return (
|
|
<a href={post.url}>
|
|
<div
|
|
class="main-content"
|
|
style="margin-bottom: 10px; font-size: 125%;"
|
|
>
|
|
<div>
|
|
<b>{post.title}</b> - {post.pubDate}
|
|
<br />
|
|
</div>
|
|
<i>{post.description}</i>
|
|
</div>
|
|
</a>
|
|
);
|
|
}
|
|
})
|
|
}
|
|
</div>
|