summaryrefslogtreecommitdiff
path: root/www/src/components/BlogPost.astro
diff options
context:
space:
mode:
Diffstat (limited to 'www/src/components/BlogPost.astro')
-rw-r--r--www/src/components/BlogPost.astro6
1 files changed, 3 insertions, 3 deletions
diff --git a/www/src/components/BlogPost.astro b/www/src/components/BlogPost.astro
index 0e358c0ca..4c73608a3 100644
--- a/www/src/components/BlogPost.astro
+++ b/www/src/components/BlogPost.astro
@@ -8,8 +8,8 @@ export interface Props {
title: string;
author?: string;
publishDate: string;
- heroImage: string;
- heroImageAlt: string;
+ heroImage?: string;
+ heroImageAlt?: string;
}
const { title, author, publishDate, heroImage, heroImageAlt } = Astro.props;
@@ -18,7 +18,7 @@ const { title, author, publishDate, heroImage, heroImageAlt } = Astro.props;
<div class="layout">
<article>
<header>
- {heroImage && <img width="720" height="420" class="hero-image" loading="lazy" src={heroImage} alt={heroImageAlt}/>}
+ <img width="720" height="420" class="hero-image" loading="lazy" src={heroImage || '/social.jpg'} alt={heroImageAlt || ""} />
<p class="publish-date">{publishDate}</p>
<h1 class="title">{title}</h1>
{author && <Author authorId={author} />}