From fc7d14db74cc1d03de9ba1c25ce3dc3835dfed54 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Wed, 24 Jan 2024 17:36:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B9=A6=E7=AD=BE=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E5=9B=BE=E6=97=A0=E6=B3=95=E5=B1=95=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/notion/mapImage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/notion/mapImage.js b/lib/notion/mapImage.js index c0711e6aa34..dbb785e15cc 100644 --- a/lib/notion/mapImage.js +++ b/lib/notion/mapImage.js @@ -21,9 +21,9 @@ const mapImgUrl = (img, block, type = 'block', from) => { } // Notion 图床转换为永久地址 - const isNotionImg = ret.indexOf('secure.notion-static.com') > 0 || ret.indexOf('prod-files-secure') > 0 + const isNotionSignImg = ret.indexOf('https://www.notion.so/image') !== 0 && (ret.indexOf('secure.notion-static.com') > 0 || ret.indexOf('prod-files-secure') > 0) const isImgBlock = BLOG.IMG_URL_TYPE === 'Notion' || type !== 'block' - if (isNotionImg && isImgBlock) { + if (isNotionSignImg && isImgBlock) { ret = BLOG.NOTION_HOST + '/image/' + encodeURIComponent(ret) + '?table=' + type + '&id=' + block.id }