Skip to content

Commit

Permalink
Moved the SocialProfileJsonLd from _app to the contact page
Browse files Browse the repository at this point in the history
so it isn't on every page anymore...
  • Loading branch information
ketrab2004 committed Apr 7, 2022
1 parent 1b47b89 commit f97ad0e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
13 changes: 1 addition & 12 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Script from "next/script";
import type { AppProps } from "next/app";

import * as Components from "@components";
import { DefaultSeo, SocialProfileJsonLd } from "next-seo";
import { DefaultSeo } from "next-seo";

function MyApp({ Component, pageProps }: AppProps) {
return <>
Expand Down Expand Up @@ -39,17 +39,6 @@ function MyApp({ Component, pageProps }: AppProps) {
description: "A portfolio website for Bartek Oskam"
}}
/>
<SocialProfileJsonLd
type="Person"
name="Bartek Oskam"
url="https://ketrab2004.github.io/"
sameAs={[
"https://www.linkedin.com/in/BartekOskam/",
"https://github.com/ketrab2004"
]}
scriptId="social-profile-json-ld"
key="JsonLd"
/>

<Components.Navbar />

Expand Down
14 changes: 12 additions & 2 deletions pages/contact.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import type { NextPage } from "next";

import { NextSeo } from "next-seo";
import { NextSeo, SocialProfileJsonLd } from "next-seo";

export const Contact: NextPage = () => {
return <>
Expand All @@ -21,7 +21,17 @@ export const Contact: NextPage = () => {
}
}}
/>
{/* Use the default SocialProfileJsonLd defined in _app */}
<SocialProfileJsonLd
type="Person"
name="Bartek Oskam"
url="https://ketrab2004.github.io/"
sameAs={[
"https://www.linkedin.com/in/BartekOskam/",
"https://github.com/ketrab2004"
]}
scriptId="social-profile-json-ld"
key="JsonLd"
/>

<main>
<h1 className="text-3xl mb-2">Contact me</h1>
Expand Down

0 comments on commit f97ad0e

Please sign in to comment.