fix: several fixes to improve ahrefs site score

This commit is contained in:
2023-10-04 23:52:29 +02:00
parent 0e0d470ef5
commit 8245e1f0d8
11 changed files with 22 additions and 15 deletions

View File

@@ -1,9 +1,10 @@
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";
import { useSiteMetadata } from "@/hooks";
interface Props {
title: string;
@@ -35,7 +36,13 @@ 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}${slug}`} />}
{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} />
<meta name="twitter:description" content={description} />

View File

@@ -9,7 +9,7 @@ const Author = () => {
<div className={styles.author}>
<p className={styles.bio}>
Written by:{" "}
<a href="/pages/about">
<a href="/pages/about/">
<strong>{author.name}</strong>
</a>
{typeof window !== "undefined" ? (

View File

@@ -6,7 +6,7 @@ exports[`Author renders correctly 1`] = `
Written by:
<a
href="/pages/about"
href="/pages/about/"
>
<strong>
Rick van Lieshout

View File

@@ -165,7 +165,7 @@ exports[`Post renders correctly 1`] = `
Written by:
<a
href="/pages/about"
href="/pages/about/"
>
<strong>
Rick van Lieshout

View File

@@ -166,7 +166,7 @@ exports[`PostTemplate renders correctly 1`] = `
Written by:
<a
href="/pages/about"
href="/pages/about/"
>
<strong>
Rick van Lieshout