From 81dbaadcef7084bcd807990b7366abac3e0a9d10 Mon Sep 17 00:00:00 2001
From: Theodore Kruczek
Date: Sun, 14 Jan 2024 18:44:48 -0500
Subject: [PATCH 1/3] feat: add text to blog post if author is set
Fixes #341
---
src/components/blog/ListItem.astro | 8 ++++++++
src/components/blog/SinglePost.astro | 18 +++++++++++-------
...-started-website-with-astro-tailwind-css.md | 1 +
3 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/components/blog/ListItem.astro b/src/components/blog/ListItem.astro
index 18c2b1cc3..c4f6c7c4f 100644
--- a/src/components/blog/ListItem.astro
+++ b/src/components/blog/ListItem.astro
@@ -60,6 +60,14 @@ const link = APP_BLOG?.post?.isEnabled ? getPermalink(post.permalink, 'post') :
>
)
}
+ {
+ post.author && (
+ <>
+ {' '}
+ · {post.author.replaceAll('-', ' ')}
+ >
+ )
+ }
diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro
index 6744720ba..cba4d6110 100644
--- a/src/components/blog/SinglePost.astro
+++ b/src/components/blog/SinglePost.astro
@@ -40,6 +40,16 @@ const { Content } = post;
{post.readingTime && <> · {post.readingTime} min read>}
+ {
+ post.author && (
+
@@ -74,13 +84,7 @@ const { Content } = post;
- {
- Content ? (
-
- ) : (
-
- )
- }
+ {Content ? : }
diff --git a/src/content/post/get-started-website-with-astro-tailwind-css.md b/src/content/post/get-started-website-with-astro-tailwind-css.md
index 060202139..2c88722a4 100644
--- a/src/content/post/get-started-website-with-astro-tailwind-css.md
+++ b/src/content/post/get-started-website-with-astro-tailwind-css.md
@@ -1,5 +1,6 @@
---
publishDate: 2023-08-12T00:00:00Z
+author: John Smith
title: Get started with AstroWind to create a website using Astro and Tailwind CSS
excerpt: Start your web journey with AstroWind – harness Astro and Tailwind CSS for a stunning site. Explore our guide now.
image: https://images.unsplash.com/photo-1516996087931-5ae405802f9f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80
From 65de4fadd7eb79fe5ea926fd62cae07966e15166 Mon Sep 17 00:00:00 2001
From: Theodore Kruczek
Date: Sun, 14 Jan 2024 18:49:32 -0500
Subject: [PATCH 2/3] feat: add text to blog post if author is set
Fixes #341
---
src/components/blog/ListItem.astro | 8 ++++++++
src/components/blog/SinglePost.astro | 10 ++++++++++
.../get-started-website-with-astro-tailwind-css.md | 1 +
3 files changed, 19 insertions(+)
diff --git a/src/components/blog/ListItem.astro b/src/components/blog/ListItem.astro
index 18c2b1cc3..c4f6c7c4f 100644
--- a/src/components/blog/ListItem.astro
+++ b/src/components/blog/ListItem.astro
@@ -60,6 +60,14 @@ const link = APP_BLOG?.post?.isEnabled ? getPermalink(post.permalink, 'post') :
>
)
}
+ {
+ post.author && (
+ <>
+ {' '}
+ · {post.author.replaceAll('-', ' ')}
+ >
+ )
+ }
diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro
index 6744720ba..a2169c125 100644
--- a/src/components/blog/SinglePost.astro
+++ b/src/components/blog/SinglePost.astro
@@ -40,6 +40,16 @@ const { Content } = post;
{post.readingTime && <> · {post.readingTime} min read>}
+ {
+ post.author && (
+
+ )
+ }
diff --git a/src/content/post/get-started-website-with-astro-tailwind-css.md b/src/content/post/get-started-website-with-astro-tailwind-css.md
index 060202139..2c88722a4 100644
--- a/src/content/post/get-started-website-with-astro-tailwind-css.md
+++ b/src/content/post/get-started-website-with-astro-tailwind-css.md
@@ -1,5 +1,6 @@
---
publishDate: 2023-08-12T00:00:00Z
+author: John Smith
title: Get started with AstroWind to create a website using Astro and Tailwind CSS
excerpt: Start your web journey with AstroWind – harness Astro and Tailwind CSS for a stunning site. Explore our guide now.
image: https://images.unsplash.com/photo-1516996087931-5ae405802f9f?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=2070&q=80
From c036504482676e8c13af4112337962c0b8a397db Mon Sep 17 00:00:00 2001
From: Theodore Kruczek
Date: Sun, 14 Jan 2024 18:52:00 -0500
Subject: [PATCH 3/3] refactor: :recycle: remove unintentional formatting
change
---
src/components/blog/SinglePost.astro | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro
index cba4d6110..a2169c125 100644
--- a/src/components/blog/SinglePost.astro
+++ b/src/components/blog/SinglePost.astro
@@ -84,7 +84,13 @@ const { Content } = post;
- {Content ? : }
+ {
+ Content ? (
+
+ ) : (
+
+ )
+ }