Skip to content

Commit

Permalink
Merge pull request tangly1024#1799 from tangly1024/fix/img-cover-4-bo…
Browse files Browse the repository at this point in the history
…okmark

修复书签预览图无法展示的问题
  • Loading branch information
tangly1024 authored Jan 24, 2024
2 parents ccf861b + fc7d14d commit f88bb00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/notion/mapImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

1 comment on commit f88bb00

@vercel
Copy link

@vercel vercel bot commented on f88bb00 Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.