article seo
This commit is contained in:
parent
ab00b86481
commit
8e3e3fb923
|
|
@ -3,6 +3,8 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<meta name="description" id="meta-description" content="" />
|
||||||
|
<meta name="keywords" id="meta-keywords" content="" />
|
||||||
<title>Türkmenistan Habarlar Portaly</title>
|
<title>Türkmenistan Habarlar Portaly</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,23 @@ const NewsArticle = () => {
|
||||||
}
|
}
|
||||||
}, [language, lastLanguage]);
|
}, [language, lastLanguage]);
|
||||||
|
|
||||||
|
// SEO
|
||||||
|
useEffect(() => {
|
||||||
|
const metaDescription: any = document.querySelector(
|
||||||
|
"meta#meta-description"
|
||||||
|
);
|
||||||
|
const metaKeywords: any = document.querySelector("meta#meta-keywords");
|
||||||
|
const title: any = document.querySelector("title");
|
||||||
|
console.log(metaDescription);
|
||||||
|
try {
|
||||||
|
title.innerText = data.data.powerseo_title;
|
||||||
|
metaDescription.content = data.data.powerseo_description;
|
||||||
|
metaKeywords.content = data.data.powerseo_keywords;
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
}, [data]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
className="news-article"
|
className="news-article"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue