静态导出

This commit is contained in:
tangly1024
2023-07-23 14:28:24 +08:00
parent 4ed9b87981
commit e6475dd9cc
5 changed files with 143 additions and 14 deletions

View File

@@ -13,8 +13,16 @@ class MyDocument extends Document {
return (
<Html lang={BLOG.LANG}>
<Head>
<link rel='icon' href='/favicon.ico' />
<CommonScript />
<link rel='icon' href='/favicon.ico' />
{/* 预加载字体 */}
{BLOG.FONT_AWESOME && <>
<link rel='preload' href={BLOG.FONT_AWESOME} as="style" crossOrigin="anonymous" />
<link rel="stylesheet" href={BLOG.FONT_AWESOME} crossOrigin="anonymous" referrerpolicy="no-referrer" />
</>}
{BLOG.FONT_URL?.map((fontUrl, index) => {
return <link key={index} rel='preload' href={fontUrl} as='font' type='font/woff2' />
})}
</Head>
<body className={`${BLOG.FONT_STYLE} font-light scroll-smooth`}>