fix notion img

This commit is contained in:
tangly1024
2023-09-02 12:55:04 +08:00
parent 4b172080f3
commit 49b9d3ae75

View File

@@ -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
}