Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ be found under the `__tests__` directory and run with `yarn run test`.
### Content updates

Make your content changes to the `cms.data.js` file in the root of this
repository.
repository. In addition, you'll need to edit `siteMetadata.js` for proper SEO updating.

> ℹ We are upgrading and standardizing the naming conventions so that they may be updated without examining the component codebase. ℹ

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"localforage": "^1.10.0",
"nanoid": "^3.2.0",
"next-auth": "^4.1.2",
"next-seo": "^5.0.0",
"nodemailer": "^6.7.2",
"postcss": "^8.4.5",
"prisma": "^3.8.1",
Expand Down
3 changes: 3 additions & 0 deletions pages/_app.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import "../styles/global.css";
import { SessionProvider } from "next-auth/react";
import { DefaultSeo } from "next-seo";
import { defaultSeoContent } from "../siteMetadata";

function MyApp({ Component, pageProps: { session, ...pageProps } }) {
return (
<SessionProvider session={session}>
<DefaultSeo {...defaultSeoContent} />
<Component {...pageProps} />
</SessionProvider>
);
Expand Down
3 changes: 3 additions & 0 deletions pages/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { useState, useRef, useEffect } from "react";
import { fetcher, clientJwtDecode } from "../lib/utils";
import { useSession, signIn, signOut } from "next-auth/react";
import { routeSeoContent } from "../siteMetadata.js";
import localforage from "localforage";
import { NextSeo } from "next-seo";
import useSwr, { mutate } from "swr";
import Footer from "../components/Footer";
import NavigationHero from "../components/Sections/NavigationHero";
Expand Down Expand Up @@ -141,6 +143,7 @@ export default function Funded() {
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<NextSeo {...routeSeoContent["/"]} />
<meta name="title" content={title} />
<meta name="description" content={description} />
<meta name="author" content={author} />
Expand Down
53 changes: 53 additions & 0 deletions siteMetadata.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import {author, description, entityUrl, logoSrc, title} from './cms.data';

// https://github.com/garmeeh/next-seo#default-seo-configuration
export const defaultSeoContent = {
title : title,
description : description,
openGraph : {
type : 'website',
locale : 'en_IE',
url : entityUrl,
site_name : author,
},
twitter : {
handle : '@handle',
site : '@site',
cardType : 'summary_large_image',
}
};

export const routeSeoContent = {
"/" : {
title : "Using More of Config",
description : "This example uses more of the available config options.",
canonical : "https://www.canonical.ie/",
openGraph : {
url : 'https://www.url.ie/a',
title : 'Open Graph Title',
description : 'Open Graph Description',
images : [
{
url : logoSrc,
width : 800,
height : 600,
alt : author,
type : 'image/jpeg',
},
{
url : logoSrc,
width : 900,
height : 800,
alt : author,
type : 'image/jpeg',
},
],
site_name : author,
},
twitter : {
handle : '@tincre',
site : '@tincre',
cardType : 'summary_large_image',
}
}
};
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3191,6 +3191,11 @@ next-auth@^4.1.2:
preact-render-to-string "^5.1.19"
uuid "^8.3.2"

next-seo@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/next-seo/-/next-seo-5.0.0.tgz#8a5c82279edcbd74c4ce58efa5588528e47c0d72"
integrity sha512-uCa8hoE5VQz4D2NqZAPhqR64hY5LSmaq70wmfGK09U57TMY7XzsDI+MjfZo0MgHJM87bj3Fd/oMQbDcZ/YWhJQ==

next@^12.0.9:
version "12.0.9"
resolved "https://registry.yarnpkg.com/next/-/next-12.0.9.tgz#4eb3006b63bb866f5c2918ca0003e98f4259e063"
Expand Down