diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index e761fe3..731f90b 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -2,6 +2,8 @@ import { Suspense } from "react"; import { getPublishedPosts } from "@/lib/store"; import BlogList from "@/components/BlogList"; +export const dynamic = "force-dynamic"; + export const metadata = { title: "文章", description: "胡旭的博客文章 — 技术、随笔、旅行、阅读", diff --git a/src/app/categories/page.tsx b/src/app/categories/page.tsx index 82a45f7..9232dbc 100644 --- a/src/app/categories/page.tsx +++ b/src/app/categories/page.tsx @@ -2,6 +2,8 @@ import Link from "next/link"; import { getPublicCategories, getPostsByCategory } from "@/lib/store"; import GsapReveal from "@/components/GsapReveal"; +export const dynamic = "force-dynamic"; + export const metadata = { title: "分类", description: "按分类浏览博客文章", diff --git a/src/app/page.tsx b/src/app/page.tsx index 0cac170..d59b64d 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,6 +2,8 @@ import { getPublishedPosts } from "@/lib/store"; import HeroSection from "@/components/HeroSection"; import { FeaturedGrid, RecentList } from "@/components/PostSections"; +export const dynamic = "force-dynamic"; + export default async function HomePage() { const posts = await getPublishedPosts(); const featuredPosts = posts.filter((p) => p.featured); diff --git a/src/app/posts/[slug]/page.tsx b/src/app/posts/[slug]/page.tsx index efc43af..1c370fc 100644 --- a/src/app/posts/[slug]/page.tsx +++ b/src/app/posts/[slug]/page.tsx @@ -5,10 +5,7 @@ import PostContent from "@/components/PostContent"; const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://asui.xyz"; -export async function generateStaticParams() { - const posts = await getPublishedPosts(); - return posts.map((post) => ({ slug: post.slug })); -} +export const dynamic = "force-dynamic"; export async function generateMetadata({ params, diff --git a/src/app/tags/page.tsx b/src/app/tags/page.tsx index ec58ffe..8ea31cb 100644 --- a/src/app/tags/page.tsx +++ b/src/app/tags/page.tsx @@ -1,6 +1,8 @@ import { getAllTags } from "@/lib/store"; import GsapReveal from "@/components/GsapReveal"; +export const dynamic = "force-dynamic"; + export const metadata = { title: "标签", description: "按标签浏览博客文章",