Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 1 | --- |
| 2 | // Import the global.css file here so that it is included on |
| 3 | // all pages through the use of the <BaseHead /> component. |
| 4 | import '../styles/global.css'; |
| 5 | |
| 6 | interface Props { |
| 7 | title: string; |
| 8 | description: string; |
| 9 | image?: string; |
| 10 | } |
| 11 | |
| 12 | const canonicalURL = new URL(Astro.url.pathname, Astro.site); |
| 13 | |
| 14 | const { title, description, image = '/blog-placeholder-1.jpg' } = Astro.props; |
| 15 | --- |
| 16 | |
| 17 | <!-- Global Metadata --> |
| 18 | <meta charset="utf-8" /> |
| 19 | <meta name="viewport" content="width=device-width,initial-scale=1" /> |
| 20 | <link rel="icon" type="image/svg+xml" href="/favicon.svg" /> |
| 21 | <meta name="generator" content={Astro.generator} /> |
| 22 | |
| 23 | <!-- Font preloads --> |
Samuel Shuert | 3963283 | 2024-04-29 20:54:19 -0400 | [diff] [blame^] | 24 | <link rel="preconnect" href="https://fonts.googleapis.com"> |
| 25 | <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 26 | <link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&display=swap" rel="stylesheet"> |
Samuel Shuert | 86826b8 | 2024-04-27 16:14:20 -0400 | [diff] [blame] | 27 | |
| 28 | <!-- Canonical URL --> |
| 29 | <link rel="canonical" href={canonicalURL} /> |
| 30 | |
| 31 | <!-- Primary Meta Tags --> |
| 32 | <title>{title}</title> |
| 33 | <meta name="title" content={title} /> |
| 34 | <meta name="description" content={description} /> |
| 35 | |
| 36 | <!-- Open Graph / Facebook --> |
| 37 | <meta property="og:type" content="website" /> |
| 38 | <meta property="og:url" content={Astro.url} /> |
| 39 | <meta property="og:title" content={title} /> |
| 40 | <meta property="og:description" content={description} /> |
| 41 | <meta property="og:image" content={new URL(image, Astro.url)} /> |
| 42 | |
| 43 | <!-- Twitter --> |
| 44 | <meta property="twitter:card" content="summary_large_image" /> |
| 45 | <meta property="twitter:url" content={Astro.url} /> |
| 46 | <meta property="twitter:title" content={title} /> |
| 47 | <meta property="twitter:description" content={description} /> |
| 48 | <meta property="twitter:image" content={new URL(image, Astro.url)} /> |