修复新闻页面路由不正确的问题

This commit is contained in:
2026-09-01 15:54:27 +08:00
parent 3aeb4011d9
commit 1d493df0e1
2 changed files with 10 additions and 2 deletions
+3 -1
View File
@@ -1,5 +1,7 @@
import type { NextConfig } from "next";
const nextConfig: NextConfig = {};
const nextConfig: NextConfig = {
output: "export",
};
export default nextConfig;
+7 -1
View File
@@ -1,9 +1,15 @@
import type { Metadata } from "next";
import Link from "next/link";
import { getNewsBySlug, markdownToHtml } from "@/data/news";
import { getNewsBySlug, getNewsList, markdownToHtml } from "@/data/news";
import { PageBreadcrumb } from "@/components/layout/page-breadcrumb";
import { NewsShare } from "@/components/news/news-share";
export async function generateStaticParams() {
const news = await getNewsList();
return news.map((item) => ({ slug: item.slug }));
}
export async function generateMetadata({
params,
}: {