notionPost use BLOG.NOTION_HOST

This commit is contained in:
emengweb
2023-05-18 03:05:08 +00:00
parent 164832ff69
commit ae40338d35

View File

@@ -36,7 +36,7 @@ export async function getNotion(pageId) {
function getPageCover(postInfo) {
const pageCover = postInfo.format?.page_cover
if (pageCover) {
if (pageCover.startsWith('/')) return 'https://www.notion.so' + pageCover
if (pageCover.startsWith('/')) return BLOG.NOTION_HOST + pageCover
if (pageCover.startsWith('http')) return defaultMapImageUrl(pageCover, postInfo)
}
}