From e6ad729110781532bb7ab28f9db2c64777002cfc Mon Sep 17 00:00:00 2001 From: LooseLi <1329307562@qq.com> Date: Fri, 13 Jun 2025 15:28:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E9=80=82=E9=85=8D=E4=B8=BB=E9=A2=98=E8=89=B2=E5=A4=B1?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/style.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/themes/hexo/style.js b/themes/hexo/style.js index 17cdbac2..d297b633 100644 --- a/themes/hexo/style.js +++ b/themes/hexo/style.js @@ -116,11 +116,9 @@ const Style = () => { .dark #theme-hexo .dark\:bg-indigo-500 { background-color: var(--theme-color) !important; } - /* 移动设备菜单栏背景色 */ - #theme-hexo .hover\:bg-indigo-500:hover { - background-color: var(--theme-color) !important; - } - .dark #theme-hexo .dark\:hover\:bg-indigo-500:hover { + + // 移动设备菜单栏选中背景色 + #theme-hexo div[class*='hover:bg-indigo-500']:hover { background-color: var(--theme-color) !important; } From 04ffbbb7ef33efc84028ee245d0cdabfd6fe3afe Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 17 Jun 2025 10:55:56 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Notion=E6=95=B0=E6=8D=AE=E5=BA=93=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E9=85=8D=E7=BD=AE=E8=A7=86=E5=9B=BE=E7=B4=A2=E5=BC=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/notion.config.js | 5 +++++ lib/notion/getAllPageIds.js | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/conf/notion.config.js b/conf/notion.config.js index f402c8b3..dc98f573 100644 --- a/conf/notion.config.js +++ b/conf/notion.config.js @@ -1,8 +1,13 @@ /** * 读取Notion相关的配置 * 如果需要在Notion中添加自定义字段,可以修改此文件 + * 此文件内容可以通过环境变量覆盖,但是不支持用NOTION_CONFIG覆盖 */ module.exports = { + // Notion数据库索引,取notion的第几个视图作为站点数据和排序依据 + NOTION_INDEX: process.env.NEXT_PUBLIC_NOTION_INDEX || 0, // 默认取Notion数据库中的第1个视图 + // 由于计算机是从0开始计数、而非从1开始。因此如果要取第二个视图,可以传1,取第三个视图传2,以此类推,取数据库的最后一个视图可以传-1。 + // 自定义配置notion数据库字段名 NOTION_PROPERTY_NAME: { password: process.env.NEXT_PUBLIC_NOTION_PROPERTY_PASSWORD || 'password', diff --git a/lib/notion/getAllPageIds.js b/lib/notion/getAllPageIds.js index 8b85f9e5..acda6b95 100644 --- a/lib/notion/getAllPageIds.js +++ b/lib/notion/getAllPageIds.js @@ -1,13 +1,14 @@ +import BLOG from "@/blog.config" export default function getAllPageIds (collectionQuery, collectionId, collectionView, viewIds) { if (!collectionQuery && !collectionView) { return [] } - // 优先按照第一个视图排序 let pageIds = [] try { + // Notion数据库中的第几个视图用于站点展示和排序: + const groupIndex = BLOG.NOTION_INDEX || 0 if (viewIds && viewIds.length > 0) { - const groupIndex = viewIds.length > 0 ? viewIds.length - 1 : 0 const ids = collectionQuery[collectionId][viewIds[groupIndex]]?.collection_group_results?.blockIds || [] for (const id of ids) { pageIds.push(id)