- {filterPosts?.map(post => (
+ {filterPosts?.map((post, index) => (
-
+
))}
{siteConfig('ADSENSE_GOOGLE_ID') && (
diff --git a/themes/gitbook/index.js b/themes/gitbook/index.js
index 73ea61d8..23f2849d 100644
--- a/themes/gitbook/index.js
+++ b/themes/gitbook/index.js
@@ -34,7 +34,8 @@ import Link from 'next/link'
import dynamic from 'next/dynamic'
import { siteConfig } from '@/lib/config'
import NotionIcon from '@/components/NotionIcon'
-import AlgoliaSearchModal from '@/components/AlgoliaSearchModal'
+
+const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
const WWAds = dynamic(() => import('@/components/WWAds'), { ssr: false })
// 主题全局变量
diff --git a/themes/heo/components/SearchButton.js b/themes/heo/components/SearchButton.js
index d0dfe64d..91652df6 100644
--- a/themes/heo/components/SearchButton.js
+++ b/themes/heo/components/SearchButton.js
@@ -1,9 +1,11 @@
import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
+import dynamic from 'next/dynamic'
import { useRouter } from 'next/router'
-import AlgoliaSearchModal from '@/components/AlgoliaSearchModal'
import { useRef } from 'react'
+const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
+
/**
* 搜索按钮
* @returns
diff --git a/themes/hexo/index.js b/themes/hexo/index.js
index add49e0a..b36ff6e2 100644
--- a/themes/hexo/index.js
+++ b/themes/hexo/index.js
@@ -31,7 +31,9 @@ import { Transition } from '@headlessui/react'
import { Style } from './style'
import replaceSearchResult from '@/components/Mark'
import { siteConfig } from '@/lib/config'
-import AlgoliaSearchModal from '@/components/AlgoliaSearchModal'
+import dynamic from 'next/dynamic'
+
+const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
// 主题全局状态
const ThemeGlobalHexo = createContext()
diff --git a/themes/next/index.js b/themes/next/index.js
index e0ee29f7..fcc856fe 100644
--- a/themes/next/index.js
+++ b/themes/next/index.js
@@ -24,9 +24,11 @@ import BlogListBar from './components/BlogListBar'
import { Style } from './style'
import replaceSearchResult from '@/components/Mark'
import { siteConfig } from '@/lib/config'
-import AlgoliaSearchModal from '@/components/AlgoliaSearchModal'
import Announcement from './components/Announcement'
import Card from './components/Card'
+import dynamic from 'next/dynamic'
+
+const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
// 主题全局状态
const ThemeGlobalNext = createContext()
diff --git a/themes/nobelium/index.js b/themes/nobelium/index.js
index 85e6faa5..1dc51210 100644
--- a/themes/nobelium/index.js
+++ b/themes/nobelium/index.js
@@ -22,9 +22,11 @@ import BlogListBar from './components/BlogListBar'
import { Transition } from '@headlessui/react'
import { Style } from './style'
import replaceSearchResult from '@/components/Mark'
-import AlgoliaSearchModal from '@/components/AlgoliaSearchModal'
import { siteConfig } from '@/lib/config'
import { useRouter } from 'next/router'
+import dynamic from 'next/dynamic'
+
+const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
// 主题全局状态
const ThemeGlobalNobelium = createContext()
diff --git a/themes/simple/index.js b/themes/simple/index.js
index cf15cb1c..02cb8dd4 100644
--- a/themes/simple/index.js
+++ b/themes/simple/index.js
@@ -10,9 +10,10 @@ import { Style } from './style'
import replaceSearchResult from '@/components/Mark'
import dynamic from 'next/dynamic'
import NotionPage from '@/components/NotionPage'
-import AlgoliaSearchModal from '@/components/AlgoliaSearchModal'
import { useRouter } from 'next/router'
+const AlgoliaSearchModal = dynamic(() => import('@/components/AlgoliaSearchModal'), { ssr: false })
+
// 主题组件
const BlogListScroll = dynamic(() => import('./components/BlogListScroll'), { ssr: false });
const BlogArchiveItem = dynamic(() => import('./components/BlogArchiveItem'), { ssr: false });
diff --git a/yarn.lock b/yarn.lock
index bf13ffd0..398a5d8f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1655,14 +1655,14 @@ anymatch@~3.1.2:
normalize-path "^3.0.0"
picomatch "^2.0.4"
-aos@^3.0.0-beta.6:
- version "3.0.0-beta.6"
- resolved "https://registry.yarnpkg.com/aos/-/aos-3.0.0-beta.6.tgz#75148e3be4bb1add53f5a1828623bf82b67691e9"
- integrity sha512-VLWrpq8bfAWcetynVHMMrqdC+89Qq/Ym6UBJbHB4crIwp3RR8uq1dNGgsFzoDl03S43rlVMK+na3r5+oUCZsYw==
+aos@^2.3.4:
+ version "2.3.4"
+ resolved "https://r2.cnpmjs.org/aos/-/aos-2.3.4.tgz#eb1c29f5c1806a197cf6323080747547edd3db8e"
+ integrity sha512-zh/ahtR2yME4I51z8IttIt4lC1Nw0ktsFtmeDzID1m9naJnWXhCoARaCgNOGXb5CLy3zm+wqmRAEgMYB5E2HUw==
dependencies:
- classlist-polyfill "^1.2.0"
- lodash.debounce "^4.0.8"
- lodash.throttle "^4.1.1"
+ classlist-polyfill "^1.0.3"
+ lodash.debounce "^4.0.6"
+ lodash.throttle "^4.0.1"
arg@^5.0.2:
version "5.0.2"
@@ -1985,9 +1985,9 @@ chokidar@^3.5.3:
optionalDependencies:
fsevents "~2.3.2"
-classlist-polyfill@^1.2.0:
+classlist-polyfill@^1.0.3:
version "1.2.0"
- resolved "https://registry.yarnpkg.com/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz#935bc2dfd9458a876b279617514638bcaa964a2e"
+ resolved "https://r2.cnpmjs.org/classlist-polyfill/-/classlist-polyfill-1.2.0.tgz#935bc2dfd9458a876b279617514638bcaa964a2e"
integrity sha512-GzIjNdcEtH4ieA2S8NmrSxv7DfEV5fmixQeyTmqmRmRJPGpRBaSnA2a0VrCjyT8iW8JjEdMbKzDotAJf+ajgaQ==
classnames@^2.3.2:
@@ -2077,7 +2077,14 @@ copy-to-clipboard@^3.3.1:
dependencies:
toggle-selection "^1.0.6"
-cross-spawn@^7.0.0, cross-spawn@^7.0.2:
+cross-env@^7.0.3:
+ version "7.0.3"
+ resolved "https://r2.cnpmjs.org/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
+ integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
+ dependencies:
+ cross-spawn "^7.0.1"
+
+cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
@@ -3515,9 +3522,9 @@ localStorage@^1.0.4:
resolved "https://registry.yarnpkg.com/localStorage/-/localStorage-1.0.4.tgz#57dfa28084385f81431accb8ae24b196398223f7"
integrity sha512-r35zrihcDiX+dqWlJSeIwS9nrF95OQTgqMFm3FB2D/+XgdmZtcutZOb7t0xXkhOEM8a9kpuu7cc28g1g36I5DQ==
-lodash.debounce@^4.0.8:
+lodash.debounce@^4.0.6:
version "4.0.8"
- resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
+ resolved "https://r2.cnpmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==
lodash.merge@^4.6.2:
@@ -3525,7 +3532,7 @@ lodash.merge@^4.6.2:
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
-lodash.throttle@^4.1.1:
+lodash.throttle@^4.0.1, lodash.throttle@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==