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.

18 lines
535 B

---
const allPosts = await Astro.glob('../pages/blog/*.md*')
//@ts-ignore
const posts = allPosts.map(item => (Object.assign({}, item.frontmatter, {url: item.url}))).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>