-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathHead.jsx
More file actions
41 lines (35 loc) · 1.68 KB
/
Head.jsx
File metadata and controls
41 lines (35 loc) · 1.68 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
// deprecate project.type
// deprecate project.viewport
// deprecate page.schema
export default function Head({ router, project, page }) {
const image = page.image
const canonical = page.canonical || router.url
const favicon = project.favicon // cdn
return (
<html lang={page.locale}>
<head>
<title>{page.title} - {project.title}</title>
<meta name="description" content={page.description} />
<link rel="icon" href={favicon} type="image/png" />
<link rel="canonical" href={canonical} />
<meta name="robots" content={page.robots} />
<meta property="og:title" content={page.title} />
<meta property="og:description" content={page.description} />
<meta property="og:image" content={image} />
<meta property="og:site_name" content={project.name} />
<meta property="og:locale" content={page.locale} />
<meta property="og:type" content="website" />
<meta property="og:url" content={canonical} />
<meta name="application-name" content={project.name} />
<link rel="shortcut icon" href={favicon} type="image/png" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-title" content={project.name} />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" sizes="180x180" href={cdn(project.icons['180'])} />
<meta name="msapplication-starturl" content="/" />
<meta name="msapplication-TileColor" content={project.backgroundColor || project.color} />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
</head>
</html>
)
}