feat: display author, tags, and reading time on post pages and cards
This commit is contained in:
@@ -47,9 +47,19 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
|
||||
<h1 className="heading-xl text-ink mt-3 mb-2">
|
||||
{post.title}
|
||||
</h1>
|
||||
<p className="font-mono text-xs text-ink-soft">
|
||||
{post.readingTime} min read
|
||||
</p>
|
||||
<div className="flex items-center gap-4 font-mono text-xs text-ink-soft">
|
||||
{post.author && <span>by {post.author}</span>}
|
||||
<span>{post.readingTime} min read</span>
|
||||
</div>
|
||||
{post.tags.length > 0 && (
|
||||
<div className="flex flex-wrap gap-2 mt-4">
|
||||
{post.tags.map((tag) => (
|
||||
<span key={tag} className="rounded-full bg-surface px-3 py-1 text-xs font-medium text-ink-soft border border-border">
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</header>
|
||||
<div className="prose prose-lg max-w-none">
|
||||
<MDXRemote
|
||||
|
||||
Reference in New Issue
Block a user