@@ -3,21 +3,14 @@ import SiteFooter from "@/components/site-footer";
3
3
import SiteHeader from "@/components/site-header" ;
4
4
import SkipToContent from "@/components/skip-to-content" ;
5
5
import { cn } from "@/lib/cn" ;
6
- import { DEVDOMAIN , DOMAIN , devEnvironment } from "@/lib/constants" ;
6
+ import { siteConfig } from "@/lib/config" ;
7
+ import { getBaseUrl } from "@/lib/get-base-url" ;
7
8
import "@/styles/globals.css" ;
8
9
import type { Metadata } from "next" ;
9
10
import { Inter as FontSans } from "next/font/google" ;
10
11
import Script from "next/script" ;
11
12
import RootProviders from "./root-providers" ;
12
13
13
- const title = "Kyle Wong - Digital Marketer, Web Developer." ;
14
- const description = `Hello, I'm Kyle, a digital marketer and web developer, based in the Malaysia 🇲.` ;
15
- const image = encodeURI (
16
- `${
17
- devEnvironment ? DEVDOMAIN : DOMAIN
18
- } /api/og-image/Kyle Wong - Digital Marketer, Web Developer.`,
19
- ) ;
20
-
21
14
export const viewport = {
22
15
themeColor : [
23
16
{ media : "(prefers-color-scheme: light)" , color : "white" } ,
@@ -26,9 +19,12 @@ export const viewport = {
26
19
} ;
27
20
28
21
export const metadata : Metadata = {
29
- metadataBase : new URL ( "https://kylewong.my" ) ,
30
- title,
31
- description,
22
+ metadataBase : new URL ( siteConfig . url ) ,
23
+ title : {
24
+ default : `${ siteConfig . name } - Digital Marketer, Web Developer.` ,
25
+ template : `%s - ${ siteConfig . name } - Digital Marketer, Web Developer.` ,
26
+ } ,
27
+ description : siteConfig . description ,
32
28
keywords : [
33
29
"Digital Marketing" ,
34
30
"Web Development" ,
@@ -38,54 +34,50 @@ export const metadata: Metadata = {
38
34
] ,
39
35
authors : [
40
36
{
41
- name : "kyle" ,
42
- url : "https://kylewong.my" ,
37
+ name : siteConfig . name ,
38
+ url : siteConfig . url ,
43
39
} ,
44
40
] ,
41
+ robots : {
42
+ index : true ,
43
+ follow : true ,
44
+ nocache : false ,
45
+ } ,
45
46
creator : "kyle" ,
46
47
openGraph : {
47
- title,
48
- description,
49
- url : DOMAIN ,
50
- siteName : title ,
51
- images : [ image ] ,
52
- locale : "en-US" ,
53
48
type : "website" ,
54
- } ,
55
- icons : {
56
- icon : [
49
+ locale : "en_US" ,
50
+ url : getBaseUrl ( siteConfig . url ) ,
51
+ title : siteConfig . name ,
52
+ description : siteConfig . description ,
53
+ siteName : siteConfig . name ,
54
+ images : [
57
55
{
58
- url : "/favicon/favicon-32x32.png" ,
59
- sizes : "32x32" ,
60
- type : "image/png" ,
61
- } ,
62
- {
63
- url : "/favicon/favicon-16x16.png" ,
64
- sizes : "16x16" ,
65
- type : "image/png" ,
66
- } ,
67
- ] ,
68
- shortcut : [ "/favicon/favicon.ico" ] ,
69
- apple : [
70
- {
71
- url : "/favicon/apple-touch-icon.png" ,
72
- sizes : "180x180" ,
73
- type : "image/png" ,
56
+ url : siteConfig . ogImage ,
57
+ width : 1200 ,
58
+ height : 628 ,
59
+ alt : siteConfig . name ,
74
60
} ,
75
61
] ,
62
+ } ,
63
+ twitter : {
64
+ card : "summary_large_image" ,
65
+ title : siteConfig . name ,
66
+ description : siteConfig . description ,
67
+ images : [ siteConfig . ogImage ] ,
68
+ } ,
69
+ icons : {
76
70
other : [
77
71
{
78
72
rel : "mask-icon" ,
79
- url : "/favicon/safari-pinned-tab.svg" ,
73
+ url : "/safari-pinned-tab.svg" ,
74
+ color : "#274b50" ,
80
75
} ,
81
76
] ,
82
77
} ,
83
- manifest : "/favicon/site.webmanifest" ,
84
- twitter : {
85
- card : "summary_large_image" ,
86
- title,
87
- description,
88
- images : [ image ] ,
78
+ manifest : "/site.webmanifest" ,
79
+ alternates : {
80
+ canonical : getBaseUrl ( siteConfig . url ) ,
89
81
} ,
90
82
formatDetection : {
91
83
email : false ,
0 commit comments