mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 23:16:50 +00:00
{配置兼容性}
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { checkContainHttp } from '@/lib/utils'
|
||||
import { checkStartWithHttp } from '@/lib/utils'
|
||||
import Link from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import NotionIcon from './NotionIcon'
|
||||
@@ -23,7 +23,7 @@ const BlogPostCard = ({ post, className }) => {
|
||||
return (
|
||||
<Link
|
||||
href={post?.href}
|
||||
target={checkContainHttp(post.slug) ? '_blank' : '_self'}
|
||||
target={checkStartWithHttp(post.slug) ? '_blank' : '_self'}
|
||||
passHref>
|
||||
<div
|
||||
key={post.id}
|
||||
|
||||
Reference in New Issue
Block a user