Skip to content

Commit

Permalink
fix(seo): define /blog metadata on page.tsx instead of layout.tsx
Browse files Browse the repository at this point in the history
Prevent pass metadata to subroutes of `/blog`
  • Loading branch information
mateusfg7 committed Nov 29, 2023
1 parent aec294c commit a8c2626
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/app/blog/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
import type { Metadata } from 'next'

export const metadata: Metadata = {
title: 'Blog',
description:
'My personal posts and thoughts about all kind of stuff that I like. Main philosophic and technical text.',
keywords: [
'blog',
'thoughts',
'texts',
'technical',
'tutorials',
'posts',
'phisolophy'
]
}

export default function BlogLayout({
children
}: {
Expand Down
16 changes: 16 additions & 0 deletions src/app/blog/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import { type Metadata } from 'next'
import Link, { LinkProps } from 'next/link'

import { allPosts } from 'contentlayer/generated'
Expand All @@ -13,6 +14,21 @@ import { getSortedPosts } from '@/shared/lib/get-sorted-posts'
import { PostList } from '@/shared/components/post-list'
import { Title } from '@/shared/components/title'

export const metadata: Metadata = {
title: 'Blog',
description:
'My personal posts and thoughts about all kind of stuff that I like. Main philosophic and technical text.',
keywords: [
'blog',
'thoughts',
'texts',
'technical',
'tutorials',
'posts',
'phisolophy'
]
}

type TopLinkProps = {
Icon: PhosphorIcon
title: string
Expand Down

0 comments on commit a8c2626

Please sign in to comment.