diff options
Diffstat (limited to 'www/src/components')
-rw-r--r-- | www/src/components/BaseHead.astro | 7 | ||||
-rw-r--r-- | www/src/components/BlogHead.astro | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/www/src/components/BaseHead.astro b/www/src/components/BaseHead.astro index d57da1d89..6593200de 100644 --- a/www/src/components/BaseHead.astro +++ b/www/src/components/BaseHead.astro @@ -3,8 +3,9 @@ export interface Props { title: string; description: string; canonicalURL: URL | string, + image?: string; } -const { title, description, canonicalURL } = Astro.props; +const { title, description, image = 'https://astro.build/social.jpg?v=1', canonicalURL } = Astro.props; --- <!-- Global Metadata --> @@ -25,14 +26,14 @@ const { title, description, canonicalURL } = Astro.props; <meta property="og:url" content={canonicalURL} /> <meta property="og:title" content={title} /> <meta property="og:description" content={description} /> -<meta property="og:image" content="https://astro.build/social.jpg?v=1" /> +<meta property="og:image" content={image} /> <!-- Twitter --> <meta property="twitter:card" content="summary_large_image" /> <meta property="twitter:url" content={canonicalURL} /> <meta property="twitter:title" content={title} /> <meta property="twitter:description" content={description} /> -<meta property="twitter:image" content="https://astro.build/social.jpg?v=1" /> +<meta property="twitter:image" content={image} /> <!-- Fonts --> <link rel="dns-prefetch" href="https://fonts.googleapis.com"> diff --git a/www/src/components/BlogHead.astro b/www/src/components/BlogHead.astro index 1fa671f97..6b859314d 100644 --- a/www/src/components/BlogHead.astro +++ b/www/src/components/BlogHead.astro @@ -1,7 +1,7 @@ --- import BaseHead from './BaseHead.astro'; -const { title, description, canonicalURL } = Astro.props; +const { title, description, image, canonicalURL } = Astro.props; --- -<BaseHead title={title} description={description} canonicalURL={canonicalURL} /> +<BaseHead title={title} description={description} image={image} canonicalURL={canonicalURL} /> <link rel="stylesheet" href={Astro.resolve('../scss/blog.css')} />
\ No newline at end of file |