generated from mateusfg7/nextjs-setup
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config): create
website.config.ts
with global config and metadata
- Loading branch information
Showing
18 changed files
with
70 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import { useMDXComponent } from 'next-contentlayer/hooks' | |
import { allPosts, type Post } from 'contentlayer/generated' | ||
|
||
import { slug } from '@/shared/lib/slug' | ||
import { host } from '@/shared/lib/webserver-constants' | ||
import { config } from 'global-config' | ||
import { Folder, CalendarBlank, Clock, Tag } from '@/shared/lib/phosphor-icons' | ||
import { Date } from '@/shared/components/date' | ||
import { TopButton } from './components/top-button' | ||
|
@@ -23,7 +23,7 @@ export function generateMetadata({ params }: Props): Metadata { | |
const post = allPosts.find(post => post.id === params.slug) as Post | ||
|
||
return { | ||
title: `mfg-b | ${post.title}`, | ||
title: post.title, | ||
description: post.description, | ||
authors: { name: post.author_info.name, url: post.author_info.url }, | ||
keywords: post.tags.split(',').map(tag => tag.trim()), | ||
|
@@ -36,7 +36,7 @@ export function generateMetadata({ params }: Props): Metadata { | |
type: 'article', | ||
url: `https://mfg-b.vercel.app/post/${params.slug}`, | ||
images: { | ||
url: `${host}/post/${post.id}/thumbnail`, | ||
url: `${config.webserver.host}/post/${post.id}/thumbnail`, | ||
width: 1200, | ||
height: 630 | ||
} | ||
|
@@ -46,9 +46,9 @@ export function generateMetadata({ params }: Props): Metadata { | |
title: post.title, | ||
description: post.description, | ||
creator: 'Mateus Felipe Gonçalves <[email protected]>', | ||
site: `${host}`, | ||
site: `${config.webserver.host}`, | ||
images: { | ||
url: `${host}/post/${post.id}/og`, | ||
url: `${config.webserver.host}/post/${post.id}/og`, | ||
width: 1200, | ||
height: 630 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { Metadata } from "next" | ||
|
||
export const metadata: Metadata = { | ||
title: 'Portifolio', | ||
description: | ||
'List of my projects and sills' | ||
} | ||
|
||
export default function PortfolioLayout({ | ||
children | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<> | ||
{children} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { MetadataRoute } from 'next' | ||
import { host } from '@/shared/lib/webserver-constants' | ||
import { config } from 'global-config' | ||
|
||
export default function robots(): MetadataRoute.Robots { | ||
return { | ||
rules: { | ||
userAgent: '*', | ||
allow: ['/', '/post/*/thumbnail'], | ||
}, | ||
sitemap: `${host}/sitemap.xml` | ||
sitemap: `${config.webserver.host}/sitemap.xml` | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,9 @@ | |
], | ||
"@/*": [ | ||
"src/*" | ||
], | ||
"global-config": [ | ||
"./website.config.ts" | ||
] | ||
}, | ||
"plugins": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const config = { | ||
metadata: { | ||
title: 'Mateus Felipe', | ||
description: "Mateus Felipe's notes, articles, reflections and knowledge..." | ||
}, | ||
webserver: { | ||
host: process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : 'http://localhost:3000' | ||
} | ||
} |