From 13d02176a4f37ae41a0f5150a9816eb545225d4c Mon Sep 17 00:00:00 2001 From: anime Date: Sun, 6 Jul 2025 03:36:36 +0800 Subject: [PATCH] feat(NotByAI): add commerce theme configuration options to maintain consistency with other themes --- themes/commerce/components/ArticleCopyright.js | 4 ++-- themes/commerce/config.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/themes/commerce/components/ArticleCopyright.js b/themes/commerce/components/ArticleCopyright.js index 2c559a5b..b418a655 100644 --- a/themes/commerce/components/ArticleCopyright.js +++ b/themes/commerce/components/ArticleCopyright.js @@ -15,7 +15,7 @@ export default function ArticleCopyright() { const { locale } = useGlobal() - if (!CONFIG.ARTICLE_COPYRIGHT) { + if (!siteConfig('COMMERCE_ARTICLE_COPYRIGHT', null, CONFIG)) { return <> } @@ -40,7 +40,7 @@ export default function ArticleCopyright() { {locale.COMMON.COPYRIGHT}: {locale.COMMON.COPYRIGHT_NOTICE} - {siteConfig('ARTICLE_NOT_BY_AI', false, CONFIG) && ( + {siteConfig('COMMERCE_ARTICLE_NOT_BY_AI', false, CONFIG) && (
  • diff --git a/themes/commerce/config.js b/themes/commerce/config.js index 4c3e872a..c0f147ae 100644 --- a/themes/commerce/config.js +++ b/themes/commerce/config.js @@ -15,6 +15,9 @@ const CONFIG = { COMMERCE_HOME_POSTS_COUNT: 9, // 首页展示商品数 COMMERCE_CONTACT_WHATSAPP_SHOW: true, // 是否展示whatsapp联系按钮 请配置 CONTACT_WHATSAPP - COMMERCE_CONTACT_TELEGRAM_SHOW: true // 联系栏展示telegram按钮 请配置 CONTACT_TELEGRAM + COMMERCE_CONTACT_TELEGRAM_SHOW: true, // 联系栏展示telegram按钮 请配置 CONTACT_TELEGRAM + + COMMERCE_ARTICLE_COPYRIGHT: true, // 文章版权声明 + COMMERCE_ARTICLE_NOT_BY_AI: false // 显示非AI写作 } export default CONFIG