-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathseo.config.ts
87 lines (81 loc) · 2.42 KB
/
seo.config.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
import type { Metadata } from 'next/types'
import { MY_DOMAIN } from '@/utils/config'
import { colors } from '@/utils/tailwind'
export const DEFAULT_TITLE = 'Abdullah Zeidan | Web Engineer'
export const DEFAULT_DESCRIPTION =
'A dev with the passion to make the web a greater place.'
export function generateSomeMeta({
title,
description,
}: {
title: string
description?: string
}): Metadata {
return {
...DEFAULT_SEO,
title,
description: description ?? DEFAULT_DESCRIPTION,
openGraph: {
...DEFAULT_SEO.openGraph,
title,
description: description ?? DEFAULT_DESCRIPTION,
},
}
}
const DEFAULT_SEO: Metadata = {
metadataBase: new URL(MY_DOMAIN),
title: { absolute: DEFAULT_TITLE, template: '%s | Abdullah Zeidan' },
description: DEFAULT_DESCRIPTION,
manifest: '/meta/site.webmanifest',
applicationName: 'zabd.dev',
// generates metadata for both `og:` and `twitter:`
openGraph: {
title: { absolute: DEFAULT_TITLE, template: '%s | Abdullah Zeidan' },
description: DEFAULT_DESCRIPTION,
type: 'website',
siteName: "Abdullah Zeidan's Personal Website",
images: [
{
url: '/images/og-image.png',
type: 'image/png',
alt: "Abdullah Zeidan's logo",
width: 256,
height: 256,
},
],
},
twitter: {
// title: { absolute: DEFAULT_TITLE, template: '%s | Abdullah Zeidan' },
// description: DEFAULT_DESCRIPTION,
site: '@zabd_dev',
card: 'summary_large_image',
},
icons: {
apple: { sizes: '180x180', url: '/images/apple-touch-icon.png' },
icon: [
{
rel: 'icon',
type: 'image/svg',
sizes: '256x256',
url: '/favicon.svg',
},
{
rel: 'icon',
type: 'image/png',
sizes: '32x32',
url: '/favicon-32x32.png',
},
{
rel: 'mask-icon',
url: '/images/safari-pinned-tab.svg',
color: colors.brand[600],
},
],
},
other: {
'google-site-verification':
'sF_y0oto8QSBuruHbL7znfMWdsgBa3Ljk9jFwIpZYEI',
'msapplication-TileColor': colors.dark,
},
}
export default DEFAULT_SEO