From adccf622fdbc6d704d3bd928a10d56c0ac0e209a Mon Sep 17 00:00:00 2001 From: anime Date: Mon, 30 Dec 2024 19:43:18 +0800 Subject: [PATCH] =?UTF-8?q?feat(spoiler=20text=E6=B7=BB=E5=8A=A0=E6=96=87?= =?UTF-8?q?=E6=A1=A3):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 2 +- components/NotionPage.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/blog.config.js b/blog.config.js index 21a3efac..6d575870 100644 --- a/blog.config.js +++ b/blog.config.js @@ -298,7 +298,7 @@ const BLOG = { WIDGET_PET_SWITCH_THEME: process.env.NEXT_PUBLIC_WIDGET_PET_SWITCH_THEME || true, // 点击宠物挂件切换博客主题 - SPOILER_TEXT_TAG: process.env.NEXT_PUBLIC_SPOILER_TEXT_TAG || '', // 默认的隐藏标签 + SPOILER_TEXT_TAG: process.env.NEXT_PUBLIC_SPOILER_TEXT_TAG || '', // Spoiler文本隐藏功能,如Notion中 [sp]希望被spoiler的文字[sp],填入[sp] 即可 // 音乐播放插件 MUSIC_PLAYER: process.env.NEXT_PUBLIC_MUSIC_PLAYER || false, // 是否使用音乐播放插件 diff --git a/components/NotionPage.js b/components/NotionPage.js index d7585fb1..4baf099c 100644 --- a/components/NotionPage.js +++ b/components/NotionPage.js @@ -86,6 +86,7 @@ const NotionPage = ({ post, className }) => { }, [post]) useEffect(() => { + // Spoiler文本功能 if (SPOILER_TEXT_TAG) { import('lodash/escapeRegExp').then(escapeRegExp => { Promise.all([