-
Notifications
You must be signed in to change notification settings - Fork 0
/
meta.ts
114 lines (109 loc) · 2.71 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
const isLocalMetadata = true;
const META_URL = "https://github.com/whosramoss/nt3/";
export const META_IMAGE_PATH = isLocalMetadata ? "./" : META_URL;
export const META_NAME = "NT3 - NextJs Boilerplate";
const META_DESCRIPTION = `Next.Js Boilerplate to creative projects`;
const META_LOCALE = "en";
const META_SITENAME = META_URL;
const META_THUMBNAIL = `${META_URL}tree/main/public/nt3-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: "coding",
keywords: ["code", "creative", "effects"],
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,
};