NOTION_CONFIG支持配置FONT_URL

This commit is contained in:
tangly1024.com
2024-04-23 18:01:16 +08:00
parent afb3cf0b95
commit 981ec37654
2 changed files with 54 additions and 29 deletions

View File

@@ -30,25 +30,6 @@ class MyDocument extends Document {
/>
</>
)}
{BLOG.FONT_URL?.map((fontUrl, index) => {
if (
fontUrl.endsWith('.css') ||
fontUrl.includes('googleapis.com/css')
) {
return <link key={index} rel='stylesheet' href={fontUrl} />
} else {
return (
<link
key={index}
rel='preload'
href={fontUrl}
as='font'
type='font/woff2'
/>
)
}
})}
</Head>
<body>