feat: replace next-seo with custom header
This commit is contained in:
@ -1,10 +1,8 @@
|
||||
import '@/css/tailwind.css'
|
||||
|
||||
import { ThemeProvider } from 'next-themes'
|
||||
import { DefaultSeo } from 'next-seo'
|
||||
import Head from 'next/head'
|
||||
|
||||
import { SEO } from '@/components/SEO'
|
||||
import LayoutWrapper from '@/components/LayoutWrapper'
|
||||
|
||||
export default function App({ Component, pageProps }) {
|
||||
@ -13,7 +11,6 @@ export default function App({ Component, pageProps }) {
|
||||
<Head>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
</Head>
|
||||
<DefaultSeo {...SEO} />
|
||||
<LayoutWrapper>
|
||||
<Component {...pageProps} />
|
||||
</LayoutWrapper>
|
||||
|
@ -3,7 +3,7 @@ import siteMetadata from '@/data/siteMetadata'
|
||||
import ListLayout from '@/layouts/ListLayout'
|
||||
import { PageSeo } from '@/components/SEO'
|
||||
|
||||
export const POSTS_PER_PAGE = 10
|
||||
export const POSTS_PER_PAGE = 5
|
||||
|
||||
export async function getStaticProps() {
|
||||
const posts = await getAllFilesFrontMatter('blog')
|
||||
@ -19,11 +19,7 @@ export async function getStaticProps() {
|
||||
export default function Blog({ posts, initialDisplayPosts, pagination }) {
|
||||
return (
|
||||
<>
|
||||
<PageSeo
|
||||
title={`Blog - ${siteMetadata.author}`}
|
||||
description={siteMetadata.description}
|
||||
url={`${siteMetadata.siteUrl}/blog`}
|
||||
/>
|
||||
<PageSeo title={`Blog - ${siteMetadata.author}`} description={siteMetadata.description} />
|
||||
<ListLayout
|
||||
posts={posts}
|
||||
initialDisplayPosts={initialDisplayPosts}
|
||||
|
@ -44,11 +44,7 @@ export async function getStaticProps(context) {
|
||||
export default function PostPage({ posts, initialDisplayPosts, pagination }) {
|
||||
return (
|
||||
<>
|
||||
<PageSeo
|
||||
title={siteMetadata.title}
|
||||
description={siteMetadata.description}
|
||||
url={`${siteMetadata.siteUrl}/blog/${pagination.currentPage}`}
|
||||
/>
|
||||
<PageSeo title={siteMetadata.title} description={siteMetadata.description} />
|
||||
<ListLayout
|
||||
posts={posts}
|
||||
initialDisplayPosts={initialDisplayPosts}
|
||||
|
@ -16,11 +16,7 @@ export async function getStaticProps() {
|
||||
export default function Home({ posts }) {
|
||||
return (
|
||||
<>
|
||||
<PageSeo
|
||||
title={siteMetadata.title}
|
||||
description={siteMetadata.description}
|
||||
url={siteMetadata.siteUrl}
|
||||
/>
|
||||
<PageSeo title={siteMetadata.title} description={siteMetadata.description} />
|
||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
<div className="pt-6 pb-8 space-y-2 md:space-y-5">
|
||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||
|
@ -8,11 +8,7 @@ import { PageSeo } from '@/components/SEO'
|
||||
export default function Projects() {
|
||||
return (
|
||||
<>
|
||||
<PageSeo
|
||||
title={`Projects - ${siteMetadata.author}`}
|
||||
description={siteMetadata.description}
|
||||
url={`${siteMetadata.siteUrl}/projects`}
|
||||
/>
|
||||
<PageSeo title={`Projects - ${siteMetadata.author}`} description={siteMetadata.description} />
|
||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
<div className="pt-6 pb-8 space-y-2 md:space-y-5">
|
||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||
|
@ -15,11 +15,7 @@ export default function Tags({ tags }) {
|
||||
const sortedTags = Object.keys(tags).sort((a, b) => tags[b] - tags[a])
|
||||
return (
|
||||
<>
|
||||
<PageSeo
|
||||
title={`Tags - ${siteMetadata.author}`}
|
||||
description="Things I blog about"
|
||||
url={`${siteMetadata.siteUrl}/tags`}
|
||||
/>
|
||||
<PageSeo title={`Tags - ${siteMetadata.author}`} description="Things I blog about" />
|
||||
<div className="flex flex-col items-start justify-start divide-y divide-gray-200 dark:divide-gray-700 md:justify-center md:items-center md:divide-y-0 md:flex-row md:space-x-6 md:mt-24">
|
||||
<div className="pt-6 pb-8 space-x-2 md:space-y-5">
|
||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14 md:border-r-2 md:px-6">
|
||||
|
@ -46,7 +46,6 @@ export default function Tag({ posts, tag }) {
|
||||
<PageSeo
|
||||
title={`${tag} - ${siteMetadata.title}`}
|
||||
description={`${tag} tags - ${siteMetadata.title}`}
|
||||
url={`${siteMetadata.siteUrl}/tags/${tag}`}
|
||||
/>
|
||||
<ListLayout posts={posts} title={title} />
|
||||
</>
|
||||
|
Reference in New Issue
Block a user