Skip to content

Commit

Permalink
feat: update SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
ngolapnguyen committed Mar 10, 2023
1 parent 18cb0ba commit e9432d3
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 15 deletions.
48 changes: 48 additions & 0 deletions components/SEO.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import Head from "next/head";
import React from "react";

export const SEO = () => {
return (
<Head>
<meta content="IE=edge" httpEquiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>Hunger Game</title>
<meta name="title" content="Hunger Game" />
<meta
name="description"
content="Join the Hunger Game fun with four players and a random portal location. Collect points while racing to find the portal before your opponents. Just watch out for explosions!"
/>

<meta property="og:type" content="website" />
<meta property="og:url" content="https://the-hunger-game.vercel.app/" />
<meta property="og:title" content="Hunger Game" />
<meta
property="og:description"
content="Join the Hunger Game fun with four players and a random portal location. Collect points while racing to find the portal before your opponents. Just watch out for explosions!"
/>
<meta
property="og:image"
content={`https://the-hunger-game.vercel.app/thumbnail.png`}
/>

<meta property="twitter:card" content="summary_large_image" />
<meta
property="twitter:url"
content="https://the-hunger-game.vercel.app/"
/>
<meta property="twitter:title" content="Hunger Game" />
<meta
property="twitter:description"
content="Join the Hunger Game fun with four players and a random portal location. Collect points while racing to find the portal before your opponents. Just watch out for explosions!"
/>
<meta
property="twitter:image"
content={`https://the-hunger-game.vercel.app/thumbnail.png`}
/>
<link
rel="icon"
href={`https://the-hunger-game.vercel.app/favicon.ico`}
/>
</Head>
);
};
17 changes: 2 additions & 15 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@
import "../styles/fonts.css";
import "../styles/globals.css";
import type { AppProps } from "next/app";
import Head from "next/head";
import { GameContextProvider } from "../contexts/game";
import { SEO } from "../components/SEO";

export default function App({ Component, pageProps }: AppProps) {
const metaDesc =
"Join the Hunger Game fun with four players and a random portal location. Collect points while racing to find the portal before your opponents. Just watch out for explosions!";
return (
<>
<Head>
<meta content="IE=edge" httpEquiv="X-UA-Compatible" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<title>Hunger Game</title>
<meta property="og:title" content="Hunger Game" />
<meta name="twitter:site" content="@dwarvesf" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="description" content={metaDesc} />
<meta property="og:description" content={metaDesc} />
<meta property="og:image" content="/thumbnail.png" />
<meta name="twitter:image" content="/thumbnail.png" />
</Head>
<SEO />
<GameContextProvider>
<Component {...pageProps} />
</GameContextProvider>
Expand Down
Binary file removed public/theme.png
Binary file not shown.

1 comment on commit e9432d3

@vercel
Copy link

@vercel vercel bot commented on e9432d3 Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hunger-game – ./

the-hunger-game.vercel.app
hunger-game-git-master-podso.vercel.app
hunger-game-podso.vercel.app

Please sign in to comment.