From 49b9d3ae754e45b8e75014dda080ab3615210a36 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 2 Sep 2023 12:55:04 +0800 Subject: [PATCH] fix notion img --- lib/notion/mapImage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/notion/mapImage.js b/lib/notion/mapImage.js index 951f5d2a..8d7f9fba 100644 --- a/lib/notion/mapImage.js +++ b/lib/notion/mapImage.js @@ -61,7 +61,9 @@ const mapImgUrl = (img, block, type = 'block', from) => { } // Notion 图床转换为永久地址 - if (ret.indexOf('secure.notion-static.com') > 0 && (BLOG.IMG_URL_TYPE === 'Notion' || type !== 'block')) { + const isNotionImg = 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) { ret = BLOG.NOTION_HOST + '/image/' + encodeURIComponent(ret) + '?table=' + type + '&id=' + block.id }