This repository was archived by the owner on Jun 19, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathHead.astro
More file actions
110 lines (104 loc) · 1.9 KB
/
Head.astro
File metadata and controls
110 lines (104 loc) · 1.9 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
export interface Props {
canonical?: string;
description: string;
title?: string;
}
const { canonical, description } = Astro.props;
const image = new URL("favicon.png", Astro.site).toString();
const keywords = [
"squiggleconf",
"conference",
"devtools",
"javascript",
"typescript",
"rust",
"static analysis",
];
const title = [
Astro.props.title,
"SquiggleConf",
"Supercharging web devs and their tools",
]
.filter(Boolean)
.join(" | ");
const metaPairs = [
{
content: description,
name: `description`,
},
{
content: keywords.join(),
name: `keywords`,
},
{
content: title,
property: `og:title`,
},
{
content: description,
property: `og:description`,
},
{
content: image,
property: `og:image`,
},
{
content: image,
property: `og:image:secure_url`,
},
{
content: `website`,
property: `og:type`,
},
{
content: Astro.url,
property: `og:url`,
},
{
content: image,
name: `thumbnail`,
},
{
content: `summary`,
name: `twitter:card`,
},
{
content: Astro.site,
name: `twitter:domain`,
},
{
content: "Josh Goldberg",
name: `twitter:creator`,
},
{
content: image,
name: `twitter:image`,
},
{
content: `@JoshuaKGoldberg`,
name: `twitter:site`,
},
{
content: title,
name: `twitter:title`,
},
{
content: description,
name: `twitter:description`,
},
];
---
<head>
<meta charset="utf-8" />
<link href="/favicon.png" rel="icon" type="image/svg+xml" />
<link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" />
{canonical && <link rel="canonical" href={canonical} />}
{metaPairs.map((meta) => <meta {...meta} />)}
<meta content={description} name="description" />
<meta content={keywords.join()} name="keywords" />
<meta content={Astro.generator} name="generator" />
<meta content="width=device-width" name="viewport" />
<meta content="SquiggleConf" name="apple-mobile-web-app-title" />
<title>{title}</title>
</head>