diff --git a/blog.config.js b/blog.config.js
index 9e8a2eb2..a63eda89 100644
--- a/blog.config.js
+++ b/blog.config.js
@@ -24,10 +24,21 @@ const BLOG = {
SINCE: 2021, // e.g if leave this empty, current year will be used.
BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '', // 备案号 闽ICP备XXXXXXX
APPEARANCE: 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式
- FONT: 'font-serif tracking-wider subpixel-antialiased', // 文章字体 ['font-sans', 'font-serif', 'font-mono'] @see https://www.tailwindcss.cn/docs/font-family
- FONT_URL: 'https://fonts.font.im/css2?family=Noto+Serif+SC&display=swap', // 谷歌字体中国站镜像;对应的国际站地址:https://fonts.googleapis.com/css2?family=Noto+Serif+SC&display=swap
- 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
+
+ // 字体相关
+ // FONT: 'font-sans', // 预设三种文章字体 ['font-sans', 'font-serif', 'font-mono'] @see /lib/font.js https://www.tailwindcss.cn/docs/font-family
+ // FONT_URL: 'https://fonts.font.im/css2?family=Noto+Serif+SC&display=swap', // 谷歌字体中国站镜像;对应的国际站地址:https://fonts.googleapis.com/css2?family=Noto+Serif+SC&display=swap
+ // FONT_CUSTOM: ['-apple-system', 'BlinkMacSystemFont', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"', '"Segoe UI"', '"PingFang SC"', 'HarmonyOS_Regular', '"Hiragino Sans GB"', '"Microsoft YaHei"', '"Helvetica Neue"', 'Helvetica', '"Source Han Sans SC"', '"Noto Sans CJK SC"', '"WenQuanYi Micro Hei"', 'Arial', 'sans-serif'],
+
+ // 自定义google字体示例: 请先将FONT 改为 'font-custom', 并将FONT_URL改为你的字体地址,同时在FONT_CUSTOM中指定你的 fontfamily
+ // 以下是示例:
+ FONT: 'font-custom',
+ FONT_URL: 'https://fonts.font.im/css2?family=Ma+Shan+Zheng&display=swap',
+ FONT_CUSTOM_FAMILY: ['"Times New Roman"', 'Ma Shan Zheng'],
+
+ // 图标字体
+ 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
+
BACKGROUND_LIGHT: '#eeeeee', // use hex value, don't forget '#' e.g #fffefc
BACKGROUND_DARK: '#000000', // use hex value, don't forget '#'
SUB_PATH: '', // leave this empty unless you want to deploy in a folder
diff --git a/lib/font.js b/lib/font.js
index c75810c0..bdca0598 100644
--- a/lib/font.js
+++ b/lib/font.js
@@ -46,7 +46,8 @@ const fontFamilies = {
'-apple-system',
'BlinkMacSystemFont',
'sans-serif'
- ]
+ ],
+ custom: BLOG.FONT_CUSTOM_FAMILY
}
module.exports = fontFamilies
diff --git a/pages/_document.js b/pages/_document.js
index 21fbabfb..0eb425b9 100644
--- a/pages/_document.js
+++ b/pages/_document.js
@@ -20,7 +20,7 @@ class MyDocument extends Document {
-
+
diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js
index 537f0fad..925455a4 100644
--- a/themes/hexo/LayoutBase.js
+++ b/themes/hexo/LayoutBase.js
@@ -72,7 +72,7 @@ const LayoutBase = props => {
{/* 右下角悬浮 */}
-
+
-
+
统计
-
+
文章数:
diff --git a/themes/hexo/components/ArticleCopyright.js b/themes/hexo/components/ArticleCopyright.js
index 9e7d79f6..57151869 100644
--- a/themes/hexo/components/ArticleCopyright.js
+++ b/themes/hexo/components/ArticleCopyright.js
@@ -16,7 +16,7 @@ export default function ArticleCopyright () {
})
const { locale } = useGlobal()
- return
+ return
-
{locale.COMMON.AUTHOR}:
diff --git a/themes/hexo/components/ArticleLock.js b/themes/hexo/components/ArticleLock.js
index 9a2c5705..84ef905f 100644
--- a/themes/hexo/components/ArticleLock.js
+++ b/themes/hexo/components/ArticleLock.js
@@ -23,7 +23,7 @@ export const ArticleLock = props => {
}
}
- return
+ return
{locale.COMMON.ARTICLE_LOCK_TIPS}
diff --git a/themes/hexo/components/ArticleRecommend.js b/themes/hexo/components/ArticleRecommend.js
index f5d0b0f3..e6900c09 100644
--- a/themes/hexo/components/ArticleRecommend.js
+++ b/themes/hexo/components/ArticleRecommend.js
@@ -19,7 +19,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
const { locale } = useGlobal()
return (
-
+
{locale.COMMON.RELATE_POSTS}
@@ -47,7 +47,7 @@ export default function ArticleRecommend({ recommendPosts, siteInfo }) {
style={{ backgroundImage: headerImage }}
>
-
+
{post.date?.start_date}
diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js
index 3cb65f81..45d3e24a 100644
--- a/themes/hexo/components/BlogPostCard.js
+++ b/themes/hexo/components/BlogPostCard.js
@@ -16,7 +16,7 @@ const BlogPostCard = ({ post, showSummary }) => {
-