aboutsummaryrefslogtreecommitdiff
path: root/src/components/Head.astro
blob: 00268868f77c8d7803265b4eac7b8c9978863af1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
import type { WithContext, Thing } from "schema-dts";
import JsonLd from "./JsonLd.astro";
import OpenGraph from "./OpenGraph.astro";

type Props = {
	readonly description: string;
	readonly title: string;
	readonly schema: WithContext<Thing>;
};

const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { description, title, schema } = Astro.props;
---

<head>
	<!-- Meta Tags -->
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />

	<meta name="description" content={description} />
	<meta name="robots" content="index, follow" />
	<meta name="viewport" content="width=device-width, initial-scale=1" />

	<link href="/feed.xml" rel="alternate" title="RSS" type="application/atom+xml" />
	<link href="/sitemap-index.xml" rel="sitemap" />
	<link href={canonicalURL} rel="canonical" />

	<title>{title}</title>

	<!-- Icons -->
	<link rel="icon" type="image/x-icon" href="/favicon.ico" />
	<link rel="icon" type="image/png" href="/favicon.png" />
	<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
	<link rel="manifest" href="/manifest.json" />
	<meta name="theme-color" content="#ffffff" />

	<OpenGraph title={title} description={description} />
	<JsonLd schema={schema} />
</head>