diff --git a/package.json b/package.json index 3e7ffd4..6e1aae8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@firq/fgosite", "type": "module", - "version": "0.1.1", + "version": "0.1.2", "private": true, "scripts": { "dev": "astro dev", diff --git a/src/components/blogCard.astro b/src/components/blogCard.astro index 137cb96..2861629 100644 --- a/src/components/blogCard.astro +++ b/src/components/blogCard.astro @@ -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)

{title}

-

{date}

+

{date} • Written by {author}

{description}

diff --git a/src/pages/blog.astro b/src/pages/blog.astro index 5ac01ef..4764d8e 100644 --- a/src/pages/blog.astro +++ b/src/pages/blog.astro @@ -25,6 +25,7 @@ allPosts.sort( title={post.frontmatter.title} pubdate={post.frontmatter.pubDate} description={post.frontmatter.description} + author={post.frontmatter.author} /> )) }