File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ import Head from "next/head" ;
2+
3+ export default function SEO ( { title, description } ) {
4+ return (
5+ < Head >
6+ < title > { title } </ title >
7+ < meta name = "description" content = { description } />
8+ < meta property = "og:title" content = { title } />
9+ </ Head >
10+ ) ;
11+ }
Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ import Header from "../components/Header";
66import Layout , { GradientBackground } from "../components/Layout" ;
77import ArrowIcon from "../components/ArrowIcon" ;
88import { getGlobalData } from "../utils/globalData" ;
9+ import SEO from "../components/SEO" ;
910
1011export default function Index ( { posts, globalData } ) {
1112 return (
1213 < Layout >
14+ < SEO title = { globalData . name } description = { globalData . blogTitle } />
1315 < Header name = { globalData . name } />
1416 < main className = "w-full" >
1517 < h1 className = "text-3xl lg:text-5xl text-center mb-12" >
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import CustomLink from "../../components/CustomLink";
1414import Footer from "../../components/Footer" ;
1515import Header from "../../components/Header" ;
1616import Layout , { GradientBackground } from "../../components/Layout" ;
17+ import SEO from "../../components/SEO" ;
1718
1819// Custom components/renderers to pass to MDX.
1920// Since the MDX files aren't loaded by webpack, they have no knowledge of how
@@ -36,6 +37,10 @@ export default function PostPage({
3637} ) {
3738 return (
3839 < Layout >
40+ < SEO
41+ title = { `${ frontMatter . title } - ${ globalData . name } ` }
42+ description = { frontMatter . description }
43+ />
3944 < Header name = { globalData . name } />
4045 < article className = "px-6 md:px-0" >
4146 < header >
You can’t perform that action at this time.
0 commit comments