Blog post author, version
This commit is contained in:
parent
82d800d6f8
commit
18fd2da104
3 changed files with 5 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@firq/fgosite",
|
||||
"type": "module",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
|
|
|
@ -4,6 +4,7 @@ export interface Props {
|
|||
title: string
|
||||
pubdate: string
|
||||
description: string
|
||||
author: string
|
||||
}
|
||||
|
||||
const options_date: Intl.DateTimeFormatOptions = {
|
||||
|
@ -11,7 +12,7 @@ const options_date: Intl.DateTimeFormatOptions = {
|
|||
month: 'long',
|
||||
day: '2-digit',
|
||||
}
|
||||
const { description, pubdate, url, title } = Astro.props
|
||||
const { author, description, pubdate, url, title } = Astro.props
|
||||
const date = new Date(pubdate).toLocaleDateString('en-GB', options_date)
|
||||
---
|
||||
|
||||
|
@ -19,7 +20,7 @@ const date = new Date(pubdate).toLocaleDateString('en-GB', options_date)
|
|||
<div class="circle"></div>
|
||||
<article>
|
||||
<h2>{title}</h2>
|
||||
<h3>{date}</h3>
|
||||
<h3>{date} • Written by {author}</h3>
|
||||
<p>{description}</p>
|
||||
</article>
|
||||
</a>
|
||||
|
|
|
@ -25,6 +25,7 @@ allPosts.sort(
|
|||
title={post.frontmatter.title}
|
||||
pubdate={post.frontmatter.pubDate}
|
||||
description={post.frontmatter.description}
|
||||
author={post.frontmatter.author}
|
||||
/>
|
||||
))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue