collection-cover

This commit is contained in:
tangly1024.com
2023-02-13 14:43:14 +08:00
parent 51aae492f4
commit c23e7e202d
2 changed files with 3 additions and 3 deletions

View File

@@ -129,7 +129,7 @@ function getBlogInfo({ collection, block }) {
const title = collection?.name?.[0][0] || BLOG.TITLE
const description = collection?.description ? Object.assign(collection).description[0][0] : BLOG.DESCRIPTION
const pageCover = collection?.cover ? (mapImgUrl(collection?.cover, block[idToUuid(BLOG.NOTION_PAGE_ID)]?.value)) : BLOG.HOME_BANNER_IMAGE
let icon = collection?.icon ? (mapImgUrl(collection?.icon, collection)) : BLOG.AVATAR
let icon = collection?.icon ? (mapImgUrl(collection?.icon, collection, 'collection')) : BLOG.AVATAR
// 站点图标不能是emoji情
const emojiPattern = /\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F]/g
if (emojiPattern.test(icon)) {