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",
|
"name": "@firq/fgosite",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
|
|
|
@ -4,6 +4,7 @@ export interface Props {
|
||||||
title: string
|
title: string
|
||||||
pubdate: string
|
pubdate: string
|
||||||
description: string
|
description: string
|
||||||
|
author: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const options_date: Intl.DateTimeFormatOptions = {
|
const options_date: Intl.DateTimeFormatOptions = {
|
||||||
|
@ -11,7 +12,7 @@ const options_date: Intl.DateTimeFormatOptions = {
|
||||||
month: 'long',
|
month: 'long',
|
||||||
day: '2-digit',
|
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)
|
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>
|
<div class="circle"></div>
|
||||||
<article>
|
<article>
|
||||||
<h2>{title}</h2>
|
<h2>{title}</h2>
|
||||||
<h3>{date}</h3>
|
<h3>{date} • Written by {author}</h3>
|
||||||
<p>{description}</p>
|
<p>{description}</p>
|
||||||
</article>
|
</article>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -25,6 +25,7 @@ allPosts.sort(
|
||||||
title={post.frontmatter.title}
|
title={post.frontmatter.title}
|
||||||
pubdate={post.frontmatter.pubDate}
|
pubdate={post.frontmatter.pubDate}
|
||||||
description={post.frontmatter.description}
|
description={post.frontmatter.description}
|
||||||
|
author={post.frontmatter.author}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue