generated from whosramoss/nt3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta.ts
88 lines (83 loc) · 2.46 KB
/
meta.ts
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
const isLocalMetadata = true;
const META_URL = "https://run.whosramoss.com/";
export const META_IMAGE_PATH = isLocalMetadata ? './' : META_URL;
const META_DESCRIPTION = `Running frees the mind`;
const META_LOCALE = "en";
export const META_NAME = `RUN - ${META_DESCRIPTION}`;
const META_SITENAME = META_URL;
const META_THUMBNAIL = `${META_URL}tree/main/public/run-thumbnail.png`;
const META_BASE = isLocalMetadata ? "http://localhost:3000/" : META_URL;
const openDefaultMetada = {
default: {
title: META_NAME,
applicationName: META_NAME,
description: META_DESCRIPTION,
generator: "Next.JS",
category: "run",
keywords: [
"run",
"motivation",
"health",
],
alternates: {
canonical: META_URL,
},
manifest: `${META_URL}manifest.json`,
icons: [
{ rel: 'shortcut icon', type: "image/x-icon", url: `${META_BASE}favicon.ico` },
{ rel: 'icon', type: "image/x-icon", url: `${META_BASE}favicon.ico` },
{ rel: 'icon', type: "image/png", url: `${META_BASE}favicon-32x32.png`, sizes: "32x32" },
{ rel: 'icon', type: "image/png", url: `${META_BASE}favicon-16x16.png`, sizes: "16x16", },
{ rel: 'icon', type: "image/png", url: `${META_BASE}android-chrome-192x192.png`, sizes: "192x192" },
{ rel: 'icon', type: "image/png", url: `${META_BASE}android-chrome-512x512.png`, sizes: "512x512" },
{ rel: 'apple-touch-icon', url: `${META_BASE}apple-touch-icon.png`, sizes: "180x180", },
],
},
robots: {
index: true,
follow: true,
nocache: false,
canonical: META_URL,
googleBot: {
index: true,
follow: false,
noimageindex: true,
"max-video-preview": -1,
"max-image-preview": "large",
"max-snippet": -1,
},
},
graph: {
metadataBase: new URL(META_BASE),
openGraph: {
title: META_NAME,
description: META_DESCRIPTION,
url: META_URL,
siteName: META_SITENAME,
locale: META_LOCALE,
type: "website",
images: [
{
url: META_THUMBNAIL,
width: 1200,
height: 630,
alt: META_NAME,
},
],
},
twitter: {
card: "summary_large_image",
title: META_NAME,
description: META_DESCRIPTION,
images: META_THUMBNAIL,
},
},
};
export const baseMetadata = isLocalMetadata ? {
...openDefaultMetada.default,
...openDefaultMetada.robots,
} : {
...openDefaultMetada.default,
...openDefaultMetada.robots,
...openDefaultMetada.graph
};