mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
GoogleFonts的链接现在返回css而非woff,再加一个判断
This commit is contained in:
@@ -20,7 +20,7 @@ class MyDocument extends Document {
|
||||
</>}
|
||||
|
||||
{BLOG.FONT_URL?.map((fontUrl, index) => {
|
||||
if (fontUrl.endsWith('.css')) {
|
||||
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" />
|
||||
|
||||
Reference in New Issue
Block a user