mirror of
https://github.com/KivotosRailway/website.git
synced 2026-11-03 11:06:32 +09:00
修复新闻页面路由不正确的问题
This commit is contained in:
+3
-1
@@ -1,5 +1,7 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {};
|
||||
const nextConfig: NextConfig = {
|
||||
output: "export",
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
@@ -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,
|
||||
}: {
|
||||
|
||||
Reference in New Issue
Block a user