Skip to content

Commit

Permalink
More SEO improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bradystroud committed Apr 17, 2024
1 parent 91a30a8 commit 7a4839d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
6 changes: 1 addition & 5 deletions components/layout/breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
// /components/NextBreadcrumb.tsx
"use client";

import React, { ReactNode } from "react";
import React from "react";

import { usePathname } from "next/navigation";
import Link from "next/link";
import { FaHome } from "react-icons/fa";

type TBreadCrumbProps = {
homeElement: ReactNode;
};

const replacements: Record<string, string> = {
EmbassyBarKitchen: "Embassy Bar & Kitchen",
SBBG: "South Bank Beer Garden",
Expand Down
4 changes: 1 addition & 3 deletions components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const Layout = ({ data = layoutData, children }) => {
return (
<>
<Head>
<title>Parmi Picks</title>
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<meta
name="description"
Expand All @@ -19,7 +18,6 @@ export const Layout = ({ data = layoutData, children }) => {
<meta property="og:site_name" content="Parmi Picks" />
<meta property="og:url" content="https://parmipicks.com/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Parmi Picks" />
<meta
property="og:description"
content="Reviews of every parmi I've tried and reviews. Browse through my reviews to find the best"
Expand All @@ -37,7 +35,7 @@ export const Layout = ({ data = layoutData, children }) => {
<div>
<Header data={data?.header} />
<div className="flex-1 text-gray-80 flex flex-col">
<NextBreadcrumb homeElement={"Home"} />
<NextBreadcrumb />
{children}
</div>
<Footer
Expand Down
2 changes: 2 additions & 0 deletions pages/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export default function HomePage(
<Layout data={data.global as any}>
<Head>
<link rel="canonical" href={data.page.cannonicalUrl} key="canonical" />
<meta property="og:title" content="Parmi Picks" />
<title>ParmiPicks</title>
</Head>
<Blocks {...data.page} />
<section className="m-auto">
Expand Down
5 changes: 5 additions & 0 deletions pages/reviews/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,16 @@ export default function ReviewPage(
return (
<Layout data={data.global as any}>
<Head>
<title>{data.review.restaurant.name} | ParmiPicks</title>
<link
rel="canonical"
href={data.review.cannonicalUrl}
key="canonical"
/>
<meta
property="og:title"
content={`${data.review.restaurant.name} | Parmi Picks`}
/>
<script type="application/ld+json">
{JSON.stringify({
"@context": "https://schema.org",
Expand Down
9 changes: 9 additions & 0 deletions pages/reviews/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { client } from "../../tina/__generated__/client";
import { Layout } from "../../components/layout";
import { Reviews } from "../../components/posts/reviews";
import { InferGetStaticPropsType } from "next";
import Head from "next/head";

export default function ReviewPage(
props: InferGetStaticPropsType<typeof getStaticProps>
Expand All @@ -12,6 +13,14 @@ export default function ReviewPage(

return (
<Layout>
<Head>
<title>ParmiPicks | Reviews</title>
<link
rel="canonical"
href="https://parmipicks.com/reviews"
key="canonical"
/>
</Head>
<Section className="flex-1">
<Container size="large" width="small">
<Reviews data={reviews} />
Expand Down

0 comments on commit 7a4839d

Please sign in to comment.