|
1 | 1 | import { NextIntlClientProvider } from "next-intl"; |
2 | | -import { getLocale, getTranslations } from "next-intl/server"; |
| 2 | +import { getLocale } from "next-intl/server"; |
3 | 3 | import { Metadata } from "next"; |
4 | 4 | import { siteConfig } from "@/config/site"; |
5 | 5 | import { getStaticFontUrl, usesHostedStaticAssets } from "@/utils/storage"; |
@@ -184,37 +184,31 @@ const Body = styled("body")(({ theme }) => ({ |
184 | 184 | backgroundColor: theme.colors.background.sunk, |
185 | 185 | })); |
186 | 186 |
|
187 | | -export async function generateMetadata(): Promise<Metadata> { |
188 | | - const locale = await getLocale(); |
189 | | - const t = await getTranslations(); |
190 | | - const description = t("Index.subtitle"); |
191 | | - |
192 | | - return { |
193 | | - metadataBase: new URL(siteConfig.url), |
194 | | - title: { |
195 | | - default: siteConfig.name, |
196 | | - template: `%s · ${siteConfig.name}`, |
197 | | - }, |
198 | | - description, |
199 | | - keywords: [...siteConfig.meta.keywords], |
200 | | - openGraph: { |
201 | | - title: siteConfig.name, |
202 | | - type: "website", |
203 | | - description, |
204 | | - siteName: siteConfig.name, |
| 187 | +export const metadata: Metadata = { |
| 188 | + metadataBase: new URL(siteConfig.url), |
| 189 | + title: { |
| 190 | + default: siteConfig.name, |
| 191 | + template: `%s · ${siteConfig.name}`, |
| 192 | + }, |
| 193 | + description: siteConfig.description, |
| 194 | + keywords: [...siteConfig.meta.keywords], |
| 195 | + openGraph: { |
| 196 | + title: siteConfig.name, |
| 197 | + type: "website", |
| 198 | + description: siteConfig.description, |
| 199 | + siteName: siteConfig.name, |
| 200 | + }, |
| 201 | + alternates: { |
| 202 | + types: { |
| 203 | + "application/rss+xml": [ |
| 204 | + { |
| 205 | + title: `${siteConfig.name}: Newsletter`, |
| 206 | + url: `${siteConfig.url}/newsletter/feed.xml`, |
| 207 | + }, |
| 208 | + ], |
205 | 209 | }, |
206 | | - alternates: { |
207 | | - types: { |
208 | | - "application/rss+xml": [ |
209 | | - { |
210 | | - title: `${siteConfig.name}: ${t("Newsletter.title")}`, |
211 | | - url: `${siteConfig.url}/newsletter/feed.xml?locale=${locale}`, |
212 | | - }, |
213 | | - ], |
214 | | - }, |
215 | | - }, |
216 | | - }; |
217 | | -} |
| 210 | + }, |
| 211 | +}; |
218 | 212 |
|
219 | 213 | export default async function RootLayout({ |
220 | 214 | children, |
|
0 commit comments