fix build

This commit is contained in:
2024-03-01 23:19:32 -05:00
parent 605af08295
commit 1078d8935f
+4 -2
View File
@@ -1,9 +1,9 @@
---
import { format, add } from 'date-fns';
import { getCollection } from 'astro:content';
import { Tag as TagEnum } from '../../types';
import Layout from '@layouts/Layout.astro';
import FormattedDate from '@components/FormattedDate.astro';
const { tag }: { tag?: TagEnum } = Astro.params;
@@ -45,7 +45,9 @@ const displayPosts = posts.slice(start, end);
displayPosts.map(({ slug, data }) => (
<div class="archive-post">
<a href={`/posts/${slug}`}>{data.title}</a>
<FormattedDate date={data.pubDate} />
<span>
{format(add(new Date(data.pubDate), { hours: 6 }), 'MMM do, y')}
</span>
</div>
))
}