Skip to content

Commit 031bdc7

Browse files
committed
feat: 合并Google Fonts请求到单个 link 标签 以提升页面加载速度
1 parent 0d755ee commit 031bdc7

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

app/layout.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,11 @@ export default function RootLayout({
4141
return (
4242
<html lang="zh-CN" suppressHydrationWarning>
4343
<head>
44-
{/* Inter 字体 */}
45-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet" />
46-
47-
{/* Noto Serif SC */}
48-
<link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;700&display=swap" rel="stylesheet" />
49-
50-
{/* JetBrains Mono */}
51-
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet" />
44+
{/* 合并字体请求到单个 link 标签,以提升页面加载速度 */}
45+
<link
46+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Noto+Serif+SC:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap"
47+
rel="stylesheet"
48+
/>
5249
</head>
5350
<body>
5451
<Provider>

0 commit comments

Comments
 (0)