-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate from pages router to app router (#13)
* style: run prettier * build: update Next.js from pages router to app router for better SEO, LCP and other needed things for the app BREAKING CHANGE: update Next.js to v14, React DOM and React to the latest and much deps were updated even for fixes or SSR paradigm * fix: add use client directive and other fixes
- Loading branch information
Showing
39 changed files
with
421 additions
and
307 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,63 @@ | ||
import { PostsProvider } from '@/contexts/PostsContext'; | ||
import { ToastProvider } from '@/contexts/ToastProvider.context'; | ||
import '@/styles/globals.css'; | ||
import '@/styles/hljs.css'; | ||
import { Metadata } from 'next'; | ||
import { | ||
Nunito_Sans as NunitoSans, | ||
Titillium_Web as TitilliumWeb, | ||
} from 'next/font/google'; | ||
|
||
export const metadata: Metadata = { | ||
title: { | ||
template: '%s | Blog do Alberto', | ||
default: 'Blog do Alberto | Onde você experimenta minha mente', | ||
}, | ||
description: | ||
'Aqui você encontra de (quase) tudo, especialmente tecnologia 👨🏽💻', | ||
generator: 'Next.js', | ||
applicationName: 'Blog do Alberto', | ||
keywords: | ||
'blog, frontend, desenvolvedor, developer, programador, alberto santos, react, javascript, web development, desenvolvimento web', | ||
authors: [{ name: 'Alberto', url: 'https://www.albertosantos.dev' }], | ||
creator: 'Alberto', | ||
publisher: 'Vercel', | ||
robots: { | ||
index: true, | ||
follow: true, | ||
nocache: true, | ||
googleBot: { | ||
index: true, | ||
follow: false, | ||
}, | ||
}, | ||
category: 'technology', | ||
}; | ||
|
||
const nunitoSans = NunitoSans({ | ||
subsets: ['latin'], | ||
weight: ['400', '600', '700'], | ||
}); | ||
|
||
const titillium = TitilliumWeb({ | ||
subsets: ['latin'], | ||
weight: ['400', '600', '700'], | ||
variable: '--font-titillium', | ||
}); | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="pt"> | ||
<body | ||
className={`${titillium.variable} ${nunitoSans.className} bg-blue-700`} | ||
> | ||
<ToastProvider /> | ||
<PostsProvider>{children}</PostsProvider> | ||
</body> | ||
</html> | ||
); | ||
} |
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,17 @@ | ||
import { BlogBanner, LogoBrandContainer } from '@/components'; | ||
import { PostBody } from '@/components/PostBody'; | ||
import { PostHeader } from '@/components/PostHeader'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div> | ||
<BlogBanner /> | ||
|
||
<main className="mx-auto w-full max-w-4xl px-6 pb-40"> | ||
<LogoBrandContainer /> | ||
<PostHeader /> | ||
<PostBody /> | ||
</main> | ||
</div> | ||
); | ||
} |
File renamed without changes
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
Oops, something went wrong.