mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 07:26:46 +00:00
修改默认字体
This commit is contained in:
@@ -5,7 +5,7 @@ const BLOG = {
|
||||
LINK: 'https://tangly1024.com', // 网站地址
|
||||
KEYWORDS: 'Notion, 博客', // 网站关键词 英文逗号隔开
|
||||
NOTION_PAGE_ID:
|
||||
process.env.NOTION_PAGE_ID || '02ab3b8678004aa69e9e415905ef32a5', // Important page_id!!!Duplicate Template from https://www.notion.so/tanghh/02ab3b8678004aa69e9e415905ef32a5
|
||||
process.env.NOTION_PAGE_ID || '02ab3b8678004aa69e9e415905ef32a5', // Important page_id!!!Duplicate Template from https://www.notion.so/tanghh/02ab3b8678004aa69e9e415905ef32a5
|
||||
NOTION_ACCESS_TOKEN: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public
|
||||
DEBUG: process.env.NEXT_PUBLIC_DEBUG || false, // 是否显示调试按钮
|
||||
|
||||
@@ -25,18 +25,11 @@ const BLOG = {
|
||||
BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '', // 备案号 闽ICP备XXXXXXX
|
||||
APPEARANCE: 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式
|
||||
|
||||
// 字体配置
|
||||
CUSTOM_FONT: false, // 是否使用自定义字体
|
||||
CUSTOM_FONT_URL: [], // 自定义字体的CSS
|
||||
CUSTOM_FONT_SANS: [], // 自定义无衬线字体
|
||||
CUSTOM_FONT_SERIF: [], // 自定义衬线字体
|
||||
|
||||
// 自定义字体示例: 请先将 CUSTOM_FONT 改为 true, 并将 CUSTOM_FONT_URL 改为你的字体CSS地址,同时在 CUSTOM_FONT_SANS 与 CUSTOM_FONT_SERIF 中指定你的 fontfamily
|
||||
// 以下是示例:
|
||||
// CUSTOM_FONT: true, // 是否使用自定义字体
|
||||
// CUSTOM_FONT_URL: ['https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont@1.6.0/lxgwwenkaiscreen.css'], // 自定义字体的CSS
|
||||
// CUSTOM_FONT_SANS: ['LXGW WenKai Screen'], // 自定义无衬线字体
|
||||
// CUSTOM_FONT_SERIF: ['LXGW WenKai Screen'], // 自定义衬线字体
|
||||
CUSTOM_FONT: true, // 是否使用自定义字体
|
||||
CUSTOM_FONT_URL: ['https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont@1.6.0/lxgwwenkaiscreen.css'], // 自定义字体的CSS
|
||||
CUSTOM_FONT_SANS: ['LXGW WenKai Screen'], // 自定义无衬线字体
|
||||
CUSTOM_FONT_SERIF: ['LXGW WenKai Screen'], // 自定义衬线字体
|
||||
|
||||
// 图标字体
|
||||
FONT_AWESOME_PATH: 'https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.4/css/all.min.css', // 图标库CDN ,国内推荐BootCDN,国外推荐 CloudFlare https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css
|
||||
|
||||
@@ -15,15 +15,15 @@ class MyDocument extends Document {
|
||||
<Head>
|
||||
<link rel='icon' href='/favicon.ico' />
|
||||
<link rel='icon' href='/favicon.svg' type='image/svg+xml' />
|
||||
{/* 谷歌字体镜像 */}
|
||||
{BLOG.CUSTOM_FONT
|
||||
? <link href='https://fonts.font.im/css2?family=Noto+Serif+SC&display=swap' rel='stylesheet' />
|
||||
: BLOG.CUSTOM_FONT_URL?.map(fontUrl =>
|
||||
<link href={`${fontUrl}`} key={fontUrl} rel='stylesheet' />)}
|
||||
{ BLOG.CUSTOM_FONT
|
||||
? BLOG.CUSTOM_FONT_URL?.map(fontUrl =>
|
||||
<link href={`${fontUrl}`} key={fontUrl} rel='stylesheet' />)
|
||||
: <link href='https://fonts.font.im/css2?family=Noto+Serif+SC&display=swap' rel='stylesheet' /> }
|
||||
<CommonScript />
|
||||
</Head>
|
||||
|
||||
<body className={`${BLOG.FONT} tracking-wider subpixel-antialiased bg-day dark:bg-night`}>
|
||||
<body className={'tracking-wider subpixel-antialiased bg-day dark:bg-night'}>
|
||||
字体 <div>{JSON.parse(BLOG.CUSTOM_FONT)}</div> <span>{BLOG.CUSTOM_FONT_URL}</span>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user