From 8e1d30f2b36fb8fb14380337a2ece0dbc75879c7 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 24 Feb 2024 20:52:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?stater=20=E4=B8=BB=E9=A1=8C=E8=B7=B3?= =?UTF-8?q?=E8=BD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/starter/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/starter/index.js b/themes/starter/index.js index 9e60b3b0..62f2d95a 100644 --- a/themes/starter/index.js +++ b/themes/starter/index.js @@ -110,15 +110,16 @@ const LayoutIndex = (props) => { * @returns */ const LayoutSlug = (props) => { - // 如果 是 /article/[slug] 的文章路径则进行重定向到另一个域名 + const { post } = props + + // 如果 是 /article/[slug] 的文章路径则視情況进行重定向到另一个域名 const router = useRouter() - if (siteConfig('STARTER_POST_REDIRECT_ENABLE', null, CONFIG) && isBrowser && router.route === '/[prefix]/[slug]') { + if (!post && siteConfig('STARTER_POST_REDIRECT_ENABLE', null, CONFIG) && isBrowser && router.route === '/[prefix]/[slug]') { const redirectUrl = siteConfig('STARTER_POST_REDIRECT_URL', null, CONFIG) + router.asPath.replace('?theme=landing', '') router.push(redirectUrl) return
} - const { post } = props return <>
From c983705829c869c5e274ed1a796a7c70b302d22d Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 24 Feb 2024 20:52:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?hexo=20=E6=B7=B1=E8=89=B2=E8=83=8C=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tailwind.config.js | 2 +- themes/starter/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index f5780609..82b0af3f 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -39,7 +39,7 @@ module.exports = { 'black-gray': '#101414', 'light-gray': '#e5e5e5' }, - black: '#212b36', + // black: '#212b36', 'dark-700': '#090e34b3', dark: { DEFAULT: '#111928', diff --git a/themes/starter/index.js b/themes/starter/index.js index 62f2d95a..a0a4ef07 100644 --- a/themes/starter/index.js +++ b/themes/starter/index.js @@ -54,7 +54,7 @@ const LayoutBase = (props) => { loadWowJS() }, []) - return
+ return