mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-26 15:19:38 -04:00
add date + author to posts + dedupe headings
This commit is contained in:
@@ -5,6 +5,7 @@ type Props = CollectionEntry<'blog'>['data'];
|
||||
|
||||
const { post } = Astro.props;
|
||||
const { Content } = await post.render();
|
||||
import { format } from 'date-fns';
|
||||
---
|
||||
|
||||
<article
|
||||
@@ -12,8 +13,13 @@ const { Content } = await post.render();
|
||||
>
|
||||
<div class="pb-2">
|
||||
<div class="md:flex justify-between">
|
||||
<h1 class="mb-4" id={post.slug}>{post.title}</h1>
|
||||
<h1 class="mb-4" id={post.slug}>{post.data.title}</h1>
|
||||
</div>
|
||||
<p class="italic p-0 m-0">
|
||||
<time datetime={post.data.date.toISOString()}>
|
||||
{format(post.data.date, 'MMMM yyyy')} by {post.data.author}
|
||||
</time>
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<Content />
|
||||
|
||||
Reference in New Issue
Block a user