Skip to content

Commit

Permalink
chore: add head meta data
Browse files Browse the repository at this point in the history
  • Loading branch information
enesozturk committed Dec 11, 2021
1 parent 0d3de2b commit 7e2c06d
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import "../styles/globals.css";
import { Toaster } from "react-hot-toast";

import { EditorProvider } from "../src/context/providers";
import Head from "../src/components/Head";

function MyApp({ Component, pageProps }) {
return (
<>
<Head />
<EditorProvider>
<Component {...pageProps} />
<Toaster containerClassName="mb-20" />
Expand Down
Binary file added public/awesome-course-og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions src/components/Head/Head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from "react";

import NextHead from "next/head";

export default function Head() {
return (
<div>
<NextHead>
<title>Awesome Course</title>
<meta name="og:title" content={"Awesome Course"} />

{/* Description */}
<meta
name="description"
content={
"Create awesome courses that lets your audience learn by coding."
}
/>
<meta
name="og:description"
content={
"Create awesome courses that lets your audience learn by coding."
}
/>
<meta name="og:image" content={"awesome-course-og.png"} />
<meta name="twitter:image" content={"/awesome-course-og.png"} />

{/* URL */}
<meta name="og:url" content="https://ozturkenes.com" />
</NextHead>
</div>
);
}
1 change: 1 addition & 0 deletions src/components/Head/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./Head";

1 comment on commit 7e2c06d

@vercel
Copy link

@vercel vercel bot commented on 7e2c06d Dec 11, 2021

Choose a reason for hiding this comment

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

Please # to comment.