diff --git a/themes/nav/components/BlogPostCard.js b/themes/nav/components/BlogPostCard.js index e611978a..47ddebf3 100755 --- a/themes/nav/components/BlogPostCard.js +++ b/themes/nav/components/BlogPostCard.js @@ -1,11 +1,12 @@ import Link from 'next/link' import NotionIcon from './NotionIcon' import { useRouter } from 'next/router' +import { siteConfig } from '@/lib/config' const BlogPostCard = ({ post, className }) => { const router = useRouter() const currentSelected = router.asPath.split('?')[0] === '/' + post.slug - let pageIcon = post.pageIcon !== '' ? post.pageIcon : BLOG.IMG_LAZY_LOAD_PLACEHOLDER + let pageIcon = post.pageIcon !== '' ? post.pageIcon : siteConfig('IMG_LAZY_LOAD_PLACEHOLDER') pageIcon = post.pageIcon.indexOf('amazonaws.com') !== -1 ? post.pageIcon + '&width=88' : post.pageIcon return ( diff --git a/themes/nav/components/MenuItem.js b/themes/nav/components/MenuItem.js index ee8de76b..79333157 100644 --- a/themes/nav/components/MenuItem.js +++ b/themes/nav/components/MenuItem.js @@ -52,6 +52,7 @@ export const MenuItem = ({ link }) => { { link?.subMenus?.map((sLink, index) => { + // #号加标题 快速跳转到指定锚点 const sUrl = sLink?.to && sLink?.to.length > 0 ? sLink.to : '#' + sLink?.title return
diff --git a/themes/nav/index.js b/themes/nav/index.js index 48aa977a..742704c8 100755 --- a/themes/nav/index.js +++ b/themes/nav/index.js @@ -30,11 +30,10 @@ import BlogPostListAll from './components/BlogPostListAll' import BlogPostCard from './components/BlogPostCard' import Link from 'next/link' import dynamic from 'next/dynamic' - import { MenuItem } from './components/MenuItem' import LogoBar from './components/LogoBar' - import { siteConfig } from '@/lib/config' + const WWAds = dynamic(() => import('@/components/WWAds'), { ssr: false }) // 主题全局变量