mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
fix: solve linked img crash
This commit is contained in:
@@ -7,6 +7,11 @@ import NotionPage from '@/components/NotionPage'
|
||||
|
||||
const BlogPostCard = ({ post, showSummary }) => {
|
||||
const showPreview = CONFIG_HEXO.POST_LIST_PREVIEW && post.blockMap
|
||||
const linkedCoverPrefix = 'https://www.notion.so/image/'
|
||||
if (post?.page_cover && post?.page_cover?.startsWith(linkedCoverPrefix)) {
|
||||
const linkedCoverPrefixLength = linkedCoverPrefix.length
|
||||
post.page_cover = decodeURIComponent(post.page_cover.slice(linkedCoverPrefixLength))
|
||||
}
|
||||
return (
|
||||
<div className="w-full shadow-sm hover:shadow border dark:border-black rounded-xl bg-white dark:bg-hexo-black-gray duration-300">
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user