mirror of
https://github.com/theoludwig/theoludwig.git
synced 2026-08-25 09:21:33 +02:00
build(deps): update latest
This commit is contained in:
@@ -17,7 +17,7 @@ const args = util.parseArgs({
|
||||
const host = args.values.host
|
||||
const basePath = args.values.path
|
||||
|
||||
const port = Number.parseInt(args.values.port, 10)
|
||||
const port = Math.trunc(Number(args.values.port))
|
||||
if (Number.isNaN(port)) {
|
||||
console.error("Error: Invalid port number.")
|
||||
process.exit(1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM docker.io/node:24.15.0-slim@sha256:879b21aec4a1ad820c27ccd565e7c7ed955f24b92e6694556154f251e4bdb240 AS node-pnpm
|
||||
FROM docker.io/node:26.7.0-slim@sha256:4ebb5ace66f15a24c14c492e01a8beeed4fddf970a856109f5126e703e5fe503 AS node-pnpm
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME/bin:$PATH"
|
||||
RUN npm install --global corepack@0.35.0 && corepack enable
|
||||
@@ -9,7 +9,7 @@ WORKDIR /usr/src/app
|
||||
|
||||
FROM node-pnpm AS builder
|
||||
COPY ./ ./
|
||||
RUN pnpm install --global turbo@2.9.16
|
||||
RUN pnpm install --global turbo@2.10.11
|
||||
RUN turbo prune @repo/website --docker
|
||||
|
||||
FROM node-pnpm AS installer
|
||||
|
||||
@@ -3,13 +3,10 @@ import { notFound } from "next/navigation"
|
||||
|
||||
import { getBlogPostBySlug, getBlogPosts } from "@repo/blog"
|
||||
import { BlogPostUI } from "@repo/blog/BlogPostUI"
|
||||
import type { Locale } from "@repo/utils/constants"
|
||||
import { setRequestLocale } from "next-intl/server"
|
||||
|
||||
interface BlogPostPageProps {
|
||||
params: Promise<{
|
||||
slug: string
|
||||
locale: Locale
|
||||
}>
|
||||
}
|
||||
|
||||
@@ -47,9 +44,7 @@ export const generateStaticParams = async (): Promise<Array<{ slug: string }>> =
|
||||
const BlogPostPage: React.FC<BlogPostPageProps> = async (props) => {
|
||||
const { params } = props
|
||||
|
||||
const { locale, slug } = await params
|
||||
// Enable static rendering
|
||||
setRequestLocale(locale)
|
||||
const { slug } = await params
|
||||
|
||||
const blogPost = await getBlogPostBySlug(slug)
|
||||
if (blogPost == null) {
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { getBlogPosts } from "@repo/blog"
|
||||
import { BlogPosts } from "@repo/blog/BlogPosts"
|
||||
import type { LocaleProps } from "@repo/i18n/routing"
|
||||
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
||||
import { Section, SectionDescription, SectionTitle } from "@repo/ui/Layout/Section"
|
||||
import { LOCALE_DEFAULT } from "@repo/utils/constants"
|
||||
import type { Metadata } from "next"
|
||||
import { setRequestLocale } from "next-intl/server"
|
||||
|
||||
const title = "Blog | Théo LUDWIG"
|
||||
const description = "The latest news about my journey of learning computer science."
|
||||
@@ -26,15 +24,7 @@ export const generateMetadata = async (): Promise<Metadata> => {
|
||||
}
|
||||
}
|
||||
|
||||
interface BlogPageProps extends LocaleProps {}
|
||||
|
||||
const BlogPage: React.FC<BlogPageProps> = async (props) => {
|
||||
const { params } = props
|
||||
|
||||
const { locale } = await params
|
||||
// Enable static rendering
|
||||
setRequestLocale(locale)
|
||||
|
||||
const BlogPage: React.FC = async () => {
|
||||
const posts = await getBlogPosts()
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,23 +1,13 @@
|
||||
import "@repo/config-tailwind/styles.css"
|
||||
import type { Locale } from "@repo/utils/constants"
|
||||
import { Footer } from "@repo/ui/Layout/Footer"
|
||||
import { Header } from "@repo/ui/Layout/Header"
|
||||
import { ThemeProvider } from "@repo/ui/Layout/Header/SwitchTheme"
|
||||
import { VERSION } from "@repo/utils/constants"
|
||||
import { setRequestLocale } from "next-intl/server"
|
||||
|
||||
interface MainLayoutProps extends React.PropsWithChildren {
|
||||
params: Promise<{
|
||||
locale: string
|
||||
}>
|
||||
}
|
||||
interface MainLayoutProps extends React.PropsWithChildren {}
|
||||
|
||||
const MainLayout: React.FC<MainLayoutProps> = async (props) => {
|
||||
const { children, params } = props
|
||||
|
||||
const { locale } = await params
|
||||
// Enable static rendering
|
||||
setRequestLocale(locale as Locale)
|
||||
const MainLayout: React.FC<MainLayoutProps> = (props) => {
|
||||
const { children } = props
|
||||
|
||||
return (
|
||||
<ThemeProvider>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { LocaleProps } from "@repo/i18n/routing"
|
||||
import { About } from "@repo/ui/Home/About"
|
||||
import { Interests } from "@repo/ui/Home/Interests"
|
||||
import { OpenSource } from "@repo/ui/Home/OpenSource"
|
||||
@@ -6,17 +5,8 @@ import { Portfolio } from "@repo/ui/Home/Portfolio"
|
||||
import { Skills } from "@repo/ui/Home/Skills"
|
||||
import { MainLayout } from "@repo/ui/Layout/MainLayout"
|
||||
import { RevealFade } from "@repo/ui/Layout/Section"
|
||||
import { setRequestLocale } from "next-intl/server"
|
||||
|
||||
interface HomePageProps extends LocaleProps {}
|
||||
|
||||
const HomePage: React.FC<HomePageProps> = async (props) => {
|
||||
const { params } = props
|
||||
|
||||
const { locale } = await params
|
||||
// Enable static rendering
|
||||
setRequestLocale(locale)
|
||||
|
||||
const HomePage: React.FC = () => {
|
||||
return (
|
||||
<MainLayout>
|
||||
<About />
|
||||
|
||||
@@ -1,20 +1,10 @@
|
||||
import "@repo/config-tailwind/styles.css"
|
||||
import type { Locale } from "@repo/utils/constants"
|
||||
import { ThemeProvider } from "@repo/ui/Layout/Header/SwitchTheme"
|
||||
import { setRequestLocale } from "next-intl/server"
|
||||
|
||||
interface CurriculumVitaeLayoutProps extends React.PropsWithChildren {
|
||||
params: Promise<{
|
||||
locale: string
|
||||
}>
|
||||
}
|
||||
interface CurriculumVitaeLayoutProps extends React.PropsWithChildren {}
|
||||
|
||||
const CurriculumVitaeLayout: React.FC<CurriculumVitaeLayoutProps> = async (props) => {
|
||||
const { children, params } = props
|
||||
|
||||
const { locale } = await params
|
||||
// Enable static rendering
|
||||
setRequestLocale(locale as Locale)
|
||||
const CurriculumVitaeLayout: React.FC<CurriculumVitaeLayoutProps> = (props) => {
|
||||
const { children } = props
|
||||
|
||||
return <ThemeProvider forcedTheme="light">{children}</ThemeProvider>
|
||||
}
|
||||
|
||||
@@ -1,16 +1,6 @@
|
||||
import type { LocaleProps } from "@repo/i18n/routing"
|
||||
import { CurriculumVitae } from "@repo/ui/CurriculumVitae"
|
||||
import { setRequestLocale } from "next-intl/server"
|
||||
|
||||
interface CurriculumVitaeProps extends LocaleProps {}
|
||||
|
||||
const CurriculumVitaePage: React.FC<CurriculumVitaeProps> = async (props) => {
|
||||
const { params } = props
|
||||
|
||||
const { locale } = await params
|
||||
// Enable static rendering
|
||||
setRequestLocale(locale)
|
||||
|
||||
const CurriculumVitaePage: React.FC = () => {
|
||||
return <CurriculumVitae />
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Locale } from "@repo/utils/constants"
|
||||
import { LOCALES } from "@repo/utils/constants"
|
||||
import type { Metadata, Viewport } from "next"
|
||||
import { NextIntlClientProvider } from "next-intl"
|
||||
import { getMessages, getTranslations, setRequestLocale } from "next-intl/server"
|
||||
import { getLocale, getMessages, getTranslations } from "next-intl/server"
|
||||
import Script from "next/script"
|
||||
|
||||
const DOMAIN = "theoludwig.fr"
|
||||
@@ -12,15 +12,8 @@ export const viewport: Viewport = {
|
||||
themeColor: "#00aeff",
|
||||
}
|
||||
|
||||
export const generateMetadata = async ({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{
|
||||
locale: string
|
||||
}>
|
||||
}): Promise<Metadata> => {
|
||||
const { locale } = await params
|
||||
const t = await getTranslations({ locale: locale as Locale })
|
||||
export const generateMetadata = async (): Promise<Metadata> => {
|
||||
const t = await getTranslations()
|
||||
const title = t("meta.title")
|
||||
const description = `${title} - ${t("meta.description")}`
|
||||
const image = "/images/logo.webp"
|
||||
@@ -63,19 +56,12 @@ export const generateStaticParams = (): Array<{ locale: Locale }> => {
|
||||
})
|
||||
}
|
||||
|
||||
interface LocaleLayoutProps extends React.PropsWithChildren {
|
||||
params: Promise<{
|
||||
locale: string
|
||||
}>
|
||||
}
|
||||
interface LocaleLayoutProps extends React.PropsWithChildren {}
|
||||
|
||||
const LocaleLayout: React.FC<LocaleLayoutProps> = async (props) => {
|
||||
const { children, params } = props
|
||||
|
||||
const { locale } = await params
|
||||
// Enable static rendering
|
||||
setRequestLocale(locale as Locale)
|
||||
const { children } = props
|
||||
|
||||
const locale = await getLocale()
|
||||
const messages = await getMessages()
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
interface RootLayoutProps extends React.PropsWithChildren {}
|
||||
|
||||
const RootLayout = ({ children }: RootLayoutProps): React.ReactNode => {
|
||||
return children
|
||||
}
|
||||
|
||||
export default RootLayout
|
||||
@@ -1,20 +0,0 @@
|
||||
"use client"
|
||||
|
||||
import Error from "next/error"
|
||||
|
||||
/**
|
||||
* Render the default Next.js 404 page when a route
|
||||
* is requested that doesn't match the middleware and
|
||||
* therefore doesn't have a locale associated with it.
|
||||
*/
|
||||
const NotFound: React.FC = () => {
|
||||
return (
|
||||
<html lang="en">
|
||||
<body>
|
||||
<Error statusCode={404} />
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
}
|
||||
|
||||
export default NotFound
|
||||
Reference in New Issue
Block a user