From d68a97bc9b2dae3e251aa5c9e838423f68e323b5 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 29 Apr 2024 10:10:09 +0800 Subject: [PATCH] =?UTF-8?q?hexo=20=E4=B8=BB=E9=A2=98=E4=B8=80=E9=97=AA?= =?UTF-8?q?=E8=80=8C=E8=BF=87=E7=9A=84title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/components/Hero.js | 2 +- themes/hexo/components/Logo.js | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/themes/hexo/components/Hero.js b/themes/hexo/components/Hero.js index 67ae3468..91059205 100644 --- a/themes/hexo/components/Hero.js +++ b/themes/hexo/components/Hero.js @@ -66,7 +66,7 @@ const Hero = props => {
{/* 站点标题 */}
- {siteConfig('TITLE')} + {siteInfo?.title || siteConfig('TITLE')}
{/* 站点欢迎语 */}
diff --git a/themes/hexo/components/Logo.js b/themes/hexo/components/Logo.js index 30054acc..2279834c 100644 --- a/themes/hexo/components/Logo.js +++ b/themes/hexo/components/Logo.js @@ -1,11 +1,20 @@ import { siteConfig } from '@/lib/config' import Link from 'next/link' - +/** + * Logo + * 实际值支持文字 + * @param {*} props + * @returns + */ const Logo = props => { + const { siteInfo } = props return (
-
{siteConfig('TITLE') }
+
+ {' '} + {siteInfo?.title || siteConfig('TITLE')} +
)