diff --git a/src/components/blog/BaseHead.astro b/src/components/blog/BaseHead.astro index 32aa472..a5c044b 100644 --- a/src/components/blog/BaseHead.astro +++ b/src/components/blog/BaseHead.astro @@ -1,14 +1,16 @@ --- import '../../styles/reset.css'; import '../../styles/blog.css'; +import { SITE_TITLE, SITE_AUTHOR, SITE_DESCRIPTION } from '../../consts'; interface Props { title: string; description: string; + isArticle?: boolean; image?: string; } -const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props; +const {isArticle = false, title, description = 'default description', image = '/cozy.jpg' } = Astro.props; --- @@ -22,13 +24,25 @@ const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props; -{title} +{title} • { + title === SITE_TITLE + ? SITE_DESCRIPTION + : `${SITE_TITLE} • ${description}` +} - +{ + isArticle + ? + : +} + + + + diff --git a/src/components/blog/Header.astro b/src/components/blog/Header.astro index 64b445b..19f9ff0 100644 --- a/src/components/blog/Header.astro +++ b/src/components/blog/Header.astro @@ -1,10 +1,12 @@ --- -import { SITE_AUTHOR_MASTODON, SITE_PROJECT_REPO, SITE_TITLE } from '../../consts'; +import { SITE_AUTHOR_MASTODON, SITE_DESCRIPTION, SITE_PROJECT_REPO, SITE_TITLE } from '../../consts'; ---