From 3078c6b4fa8a77a1e3878100b3e082b1ef49d691 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 2 Dec 2024 13:33:15 +0800 Subject: [PATCH 1/3] =?UTF-8?q?link=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config.js | 6 ++++++ themes/gitbook/components/BottomMenuBar.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index b690c1aeb70..2d46b6fb476 100644 --- a/lib/config.js +++ b/lib/config.js @@ -38,6 +38,12 @@ export const siteConfig = (key, defaultVal = null, extendConfig = {}) => { case 'TAG_SORT_BY_COUNT': case 'THEME': case 'LINK': + // LINK比较特殊, + if (key === 'LINK') { + if (!extendConfig || Object.keys(extendConfig).length === 0) { + break + } + } return convertVal( getValue(extendConfig[key], getValue(defaultVal, BLOG[key])) ) diff --git a/themes/gitbook/components/BottomMenuBar.js b/themes/gitbook/components/BottomMenuBar.js index c872941b56b..cfe65c1673a 100644 --- a/themes/gitbook/components/BottomMenuBar.js +++ b/themes/gitbook/components/BottomMenuBar.js @@ -28,7 +28,7 @@ export default function BottomMenuBar({ post, className }) { onClick={togglePageNavVisible} className='inline-flex flex-col items-center justify-center px-5 border-gray-200 border-x hover:bg-gray-50 dark:hover:bg-gray-800 group dark:border-gray-600'> - + {locale.COMMON.ARTICLE_LIST} From 439cebdbe6cf8c4afa1d72c7a4ca07f1e43f4fd3 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 2 Dec 2024 13:45:37 +0800 Subject: [PATCH 2/3] sitemap --- pages/sitemap.xml.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/sitemap.xml.js b/pages/sitemap.xml.js index 8ecbd55c868..6865aa5fd75 100644 --- a/pages/sitemap.xml.js +++ b/pages/sitemap.xml.js @@ -17,7 +17,11 @@ export const getServerSideProps = async ctx => { pageId: id, from: 'sitemap.xml' }) - const link = siteConfig('LINK', '', siteData.NOTION_CONFIG) + const link = siteConfig( + 'LINK', + siteData?.siteInfo?.link, + siteData.NOTION_CONFIG + ) const localeFields = generateLocalesSitemap(link, siteData.allPages, locale) fields = fields.concat(localeFields) } From 8c0318cc7b923aa7f4c040ed8c91dbff570e55cb Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 2 Dec 2024 14:01:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=92=8C=E6=A0=87=E7=AD=BE=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/category/index.js | 4 +++- pages/tag/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/category/index.js b/pages/category/index.js index d38535c5763..1fcf752dec4 100644 --- a/pages/category/index.js +++ b/pages/category/index.js @@ -10,7 +10,9 @@ import { DynamicLayout } from '@/themes/theme' */ export default function Category(props) { const theme = siteConfig('THEME', BLOG.THEME, props.NOTION_CONFIG) - return + return ( + + ) } export async function getStaticProps({ locale }) { diff --git a/pages/tag/index.js b/pages/tag/index.js index 5360fa9ca39..0f6137db277 100644 --- a/pages/tag/index.js +++ b/pages/tag/index.js @@ -12,7 +12,7 @@ import { useRouter } from 'next/router' const TagIndex = props => { const router = useRouter() const theme = siteConfig('THEME', BLOG.THEME, props.NOTION_CONFIG) - return + return } export async function getStaticProps(req) {