perf: memoize post queries and reduce JSON-LD bloat

This commit is contained in:
2026-03-15 17:31:23 +08:00
parent 1b495d2d2d
commit 5325a08bc3
4 changed files with 40 additions and 15 deletions

View File

@@ -145,8 +145,6 @@ export default async function BlogPostPage({ params }: Props) {
wordCount: wordCount,
readingTime: `${readingTime} min read`,
}),
articleBody: textContent.slice(0, 5000),
inLanguage: siteConfig.defaultLocale,
url: postUrl,
};

View File

@@ -130,6 +130,8 @@ export default async function RootLayout({
<head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
<link rel="font" href="https://fonts.googleapis.com" />
<link rel="font" href="https://fonts.gstatic.com" />
</head>
<body>
<NextTopLoader