Skip to content

Commit bb62a41

Browse files
committed
fix: 🐛 header
add locale image:alt
1 parent 21e7ceb commit bb62a41

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

src/components/headermeta.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ interface MetaProps {
1111
defaultfavicon?: string;
1212
}
1313

14-
const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GA_TRACKING_ID || "";
1514

1615
const HMeta: React.FC<MetaProps> = ({
1716
pageTitle,
@@ -31,14 +30,18 @@ const HMeta: React.FC<MetaProps> = ({
3130
const defaultDescription = "Web3 development";
3231
const title = pageTitle ? `${pageTitle} | ${defaultTitle}` : defaultTitle;
3332
const description = pageDescription ? pageDescription : defaultDescription;
34-
const url = `https://nknighta.github.io${pagePath == undefined ? "/" : pagePath}`;
33+
const url = `https://nknighta.me${pagePath == undefined ? "/" : pagePath}`;
3534
const imgWidth = pageImgWidth ? pageImgWidth : 1280;
3635
const imgHeight = pageImgHeight ? pageImgHeight : 640;
3736
const favicon = defaultfavicon ? defaultfavicon : "/favicon.ico";
37+
const img_alt = pageImg
38+
? pageImg.replace(/.*\//, "").replace(/\.\w+$/, "")
39+
: "nknighta";
3840
//const imgx = require("/images/favicon.ico");
3941
return (
4042
<Head>
4143
<title>{title}</title>
44+
<meta name="google-site-verification" content="FadhJDiAEFAdginv7Ttd1S3Ord4FWPtK3dnlKRAKeJo" />
4245
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
4346
<meta name="description" content={description} />
4447
<meta property="og:url" content={url} />
@@ -49,10 +52,13 @@ const HMeta: React.FC<MetaProps> = ({
4952
<meta property="og:image" content={`${defaultPageImg}`} />
5053
<meta property="og:image:width" content={String(imgWidth)} />
5154
<meta property="og:image:height" content={String(imgHeight)} />
52-
55+
<meta property="og:image:alt" content={img_alt} />
56+
<meta property="og:locale" charSet="UTF-8" content="en_US" />
57+
5358
<meta property="twitter:description" content="NknightA blog" />
5459
<meta name="twitter:image" content={`${defaultPageImg}`} />
5560
<meta name="twitter:card" content="summary_large_image" />
61+
<meta name="twitter:creator" content="@ama_dev_1" />
5662
<meta name="twitter:site" content="@ama_dev_1" />
5763
<meta name="twitter:title" content={title} />
5864
<link rel="icon" href={favicon} sizes="any" />

0 commit comments

Comments
 (0)