blob: 344124012bbfab134c00fc750cadd2da9a33752d [file] [log] [blame]
Samuel Shuert86826b82024-04-27 16:14:20 -04001---
2// Import the global.css file here so that it is included on
3// all pages through the use of the <BaseHead /> component.
4import '../styles/global.css';
5
6interface Props {
7 title: string;
8 description: string;
9 image?: string;
10}
11
12const canonicalURL = new URL(Astro.url.pathname, Astro.site);
13
14const { 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 -->
24<link rel="preload" href="/fonts/atkinson-regular.woff" as="font" type="font/woff" crossorigin />
25<link rel="preload" href="/fonts/atkinson-bold.woff" as="font" type="font/woff" crossorigin />
26
27<!-- Canonical URL -->
28<link rel="canonical" href={canonicalURL} />
29
30<!-- Primary Meta Tags -->
31<title>{title}</title>
32<meta name="title" content={title} />
33<meta name="description" content={description} />
34
35<!-- Open Graph / Facebook -->
36<meta property="og:type" content="website" />
37<meta property="og:url" content={Astro.url} />
38<meta property="og:title" content={title} />
39<meta property="og:description" content={description} />
40<meta property="og:image" content={new URL(image, Astro.url)} />
41
42<!-- Twitter -->
43<meta property="twitter:card" content="summary_large_image" />
44<meta property="twitter:url" content={Astro.url} />
45<meta property="twitter:title" content={title} />
46<meta property="twitter:description" content={description} />
47<meta property="twitter:image" content={new URL(image, Astro.url)} />