fix: now setting og:url correctly as well as the canonical url

This commit is contained in:
2023-10-25 23:59:16 +02:00
parent 8245e1f0d8
commit e065f16fb5
5 changed files with 14 additions and 30 deletions

View File

@@ -2,7 +2,6 @@ import React from "react";
import Helmet from "react-helmet";
import { useSiteMetadata } from "@/hooks";
import { toKebabCase } from "../../utils";
import { CookieBar } from "../Cookiebar/CookieBar";
import * as styles from "./Layout.module.scss";
@@ -36,12 +35,6 @@ const Layout: React.FC<Props> = ({
<meta property="og:description" content={description} />
<meta property="og:site_name" content={title} />
<meta property="og:image" content={metaImageUrl} />
{slug && (
<meta
property="og:url"
content={`${url}/tag/${toKebabCase(slug.replace("/tag/", ""))}`}
/>
)}
<meta property="og:title" content={title} />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content={title} />